David Johnston writes:
If we alter syntax for mitigation purposes I'd want to consider requiring
parentheses around the columns that belong to the ORDER BY instead of
using the full extended syntax of WITHIN GROUP.
Unfortunately, that ORDER BY syntax is specified by the SQL standard,
and they didn't say anything about parentheses. We don't get to
require parens there.

The particular case that's standardized is only array_agg():

     <array aggregate function> ::=
       ARRAY_AGG
       <left paren> <value expression> [ ORDER BY <sort specification list> ]
       <right paren>

but, as we customarily do, we didn't restrict the feature to be used only
with that aggregate.

    regards, tom lane

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 17 of 20 | next ›
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedAug 29, '13 at 7:55p
activeAug 31, '13 at 3:02a
posts20
users7
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2017 Grokbase