Re: UNNEST ... WITH ORDINALITY (AND POSSIBLY OTHER STUFF) - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: UNNEST ... WITH ORDINALITY (AND POSSIBLY OTHER STUFF)
Date
Msg-id AANLkTi=ojdDXiLDQj+FDrBr_+bPabb3SvLHj4sTZ0o4+@mail.gmail.com
Whole thread Raw
In response to Re: UNNEST ... WITH ORDINALITY (AND POSSIBLY OTHER STUFF)  (<Caleb.Welton@emc.com>)
Responses Re: UNNEST ... WITH ORDINALITY (AND POSSIBLY OTHER STUFF)
List pgsql-hackers
On Sat, Nov 20, 2010 at 03:48,  <Caleb.Welton@emc.com> wrote:
> Note the standard also supports unnesting multiple arrays concurrently, the rule for handling arrays with different
lengthsis to use null padding of the shorter array. 
>
>   UNNEST( ARRAY[5,2,3,4],
>           ARRAY['hello', 'world'] )
>   WITH ORDINALITY AS t(a,b,i);

Hmmm, that means we cannot support multi-array unnest() with our
generic aggregate functions. The function prototype might be like
below, but we don't support such definition.
 unnest(anyarray1, anyarray2, ...,        OUT anyelement1, OUT anyelement2, ...) RETURNS SETOF record

So, we would need a special representation for multi-array unnest().

--
Itagaki Takahiro


pgsql-hackers by date:

Previous
From: Joachim Wieland
Date:
Subject: Re: directory archive format for pg_dump
Next
From: Pavel Stehule
Date:
Subject: Re: Fwd: patch: format function - fixed oid