Re: UNNEST ... WITH ORDINALITY (AND POSSIBLY OTHER STUFF)

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Caleb(dot)Welton(at)emc(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org, david(at)fetter(dot)org
Subject: Re: UNNEST ... WITH ORDINALITY (AND POSSIBLY OTHER STUFF)
Date: 2010-11-20 04:54:32
Message-ID: AANLkTi=ojdDXiLDQj+FDrBr_+bPabb3SvLHj4sTZ0o4+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 20, 2010 at 03:48, <Caleb(dot)Welton(at)emc(dot)com> wrote:
> Note the standard also supports unnesting multiple arrays concurrently, the rule for handling arrays with different lengths is 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-11-20 07:59:16 Re: Fwd: patch: format function - fixed oid
Previous Message Joachim Wieland 2010-11-20 04:10:37 Re: directory archive format for pg_dump