Skip site navigation (1) Skip section navigation (2)

Re: RFC: array_agg() per SQL:200n

From: Joe Conway <mail(at)joeconway(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Neil Conway <neilc(at)samurai(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RFC: array_agg() per SQL:200n
Date: 2008-01-29 01:59:45
Message-ID: 479E8891.4060302@joeconway.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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 for an empty group is NULL, not an empty array. Note that per
>> page 66, I'd expect array values in the input to array_agg() not to be
>> flattened.
> 
> Should there be an inverse operator (a SRF, in this case) that returns a
> set from an array?

Yes -- see UNNEST

Joe

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-01-29 02:11:31
Subject: Bogus cleanup code in GSSAPI/SSPI patch
Previous:From: Bruce MomjianDate: 2008-01-29 01:42:17
Subject: Re: find_typedef alternative that works on mainstream systems

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group