-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refs #26327 -- Renamed JsonAgg to JSONBAgg. #7554
Conversation
3d50f82
to
9df26c5
Compare
Please update the ticket as described in the "According to the ticket's flags," section to get feedback on the PR. |
I find it a bit odd that we ship an aggregate for a datatype we don't use for any fields ( As I mentioned on #26327 I'd be more in favor to rename the aggregate |
8dc6091
to
9cdb1bf
Compare
I chose the name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simon, is this fine with you?
|
||
.. versionadded:: 1.11 | ||
|
||
Returns the input values as a ``JSON`` array. | ||
Returns the input values as a ``JSON`` array. PostgreSQL ships with two |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think a single sentence would work here: "Returns ... using JSONB_AGG()
(requires PostgreSQL 9.5+)."
I'm not sure if the other sentences are adding much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Perhaps "PostgreSQL ships ..." is unnecessary because it's already in the documentation for JSONField
.
…ailability in documentation. Thanks to Christian von Roques for the report.
9cdb1bf
to
82885f1
Compare
@timgraham to answer your previous question I also think |
merged in aa2cb4c, thanks! |
Thanks to Christian von Roques for the report.
I added a new flag to indicate availability of
JSONB_AGG
and fallback tojson_agg
on PostgreSQL. I tried to test locally for things highlighted in https://www.postgresql.org/docs/9.4/static/datatype-json.html#JSON-KEYS-ELEMENTS but get the same result on both 9.5 and 9.4 usingFloatField
with the value 1.230e-5.Are more tests needed? Alternatively, it may be better to disallow use of this function on PostgreSQL 9.4?