Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-03-24 Thread Bruce Momjian
Add to TODO: * Add SQL-standard array_agg() and unnest() array functions http://archives.postgresql.org/pgsql-hackers/2008-01/msg01017.php --- Neil Conway wrote: I recently noticed that SQL:200n[1] defines a new

Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-02-02 Thread Neil Conway
On Tue, 2008-01-29 at 13:06 +0100, Peter Eisentraut wrote: The ORDER BY clause would also used in XMLAGG, so we should try to parse this in a generalized way. Yeah, that should be doable. We could go further and expose ORDER BY to CREATE AGGREGATE, so that users could write aggregates that are

Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-01-29 Thread Peter Eisentraut
Am Montag, 28. Januar 2008 schrieb Neil Conway: To parse the ORDER BY clause, we'd need to special-case array_agg() in the grammar The ORDER BY clause would also used in XMLAGG, so we should try to parse this in a generalized way. -- Peter Eisentraut http://developer.postgresql.org/~petere/

Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-01-28 Thread Gregory Stark
Neil Conway [EMAIL PROTECTED] writes: AFAIK the conclusion reached by the previous thread was that to be type safe, you'd need one distinct pseudotype per aggregate function, along with some way to let the planner distinguish this class of pseudotypes from other types (in order to apply the

Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-01-28 Thread Jeff Davis
On Sun, 2008-01-27 at 22:11 -0800, Neil Conway wrote: p. 564 discusses the required behavior. The result of array_agg() is an array with one element per input value, sorted according to the optional ORDER BY clause. NULL input values are included in the array, and the result for an empty group

Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-01-28 Thread Joe Conway
Jeff Davis wrote: On Sun, 2008-01-27 at 22:11 -0800, Neil Conway wrote: p. 564 discusses the required behavior. The result of array_agg() is an array with one element per input value, sorted according to the optional ORDER BY clause. NULL input values are included in the array, and the result

Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-01-28 Thread Hitoshi Harada
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Conway Sent: Tuesday, January 29, 2008 11:00 AM To: Jeff Davis Cc: Neil Conway; pgsql-hackers Subject: Re: [HACKERS] RFC: array_agg() per SQL:200n Jeff Davis wrote: On Sun, 2008-01-27 at 22:11 -0800, Neil Conway wrote: p