[DOCS] Is this example regarding aggregates sourced by subquery correct?

2016-05-20 Thread David G. Johnston
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

Re: [DOCS] Is this example regarding aggregates sourced by subquery correct?

2016-05-20 Thread Tom Lane
"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

Re: [DOCS] Is this example regarding aggregates sourced by subquery correct?

2016-05-20 Thread David G. Johnston
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