On Fri, May 20, 2016 at 5:07 PM, Tom Lane wrote:
> "David G. Johnston" writes:
> > http://www.postgresql.org/docs/9.5/static/functions-aggregate.html
> > """
> > SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
> > But this syntax is not allowed in the SQL standard, and is not
"David G. Johnston" writes:
> http://www.postgresql.org/docs/9.5/static/functions-aggregate.html
> """
> SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
> But this syntax is not allowed in the SQL standard, and is not portable to
> other database systems.
> """
> The example se
http://www.postgresql.org/docs/9.5/static/functions-aggregate.html
"""
...This ordering is unspecified by default, but can be controlled by
writing an ORDER BY clause within the aggregate call, as shown in Section
4.2.7. Alternatively, supplying the input values from a sorted subquery
will usually