From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Sam Mason" <sam(at)samason(dot)me(dot)uk>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: is any reason why only one columns subselect are allowed in array()? |
Date: | 2008-11-18 18:13:54 |
Message-ID: | 162867790811181013t20532dcai7bbb399edb1aad7e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2008/11/18 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Sam Mason <sam(at)samason(dot)me(dot)uk> writes:
>> I've used this syntax before and got a surprising message back. I'd
>> expect to be able to do the following:
>>
>> and get the following back {"(a,1)","(b,2)"}. So I think I'm with
>> David.
>
> I concur --- if we support something like this, the behavior should be
> that you get an array of record. Pavel's proposal for a 2-D array seems
> unworkably restrictive. And I certainly don't want to end up in a
> situation where we return either a 2-D array or array of record
> depending on whether the parser thinks the column data types match ...
there are clean rules. you do array from input - when input is 1D
array, then result is 2D array, when input is record, then result is
1D array of record. Where should be problem? I see Sam proposal as
only one special case of my proposal.
Pavel
I am sorry, but you know - record type is very unfriendly to plpgsql.
>
> regards, tom lane
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
From | Date | Subject | |
---|---|---|---|
Next Message | Sam Mason | 2008-11-18 18:22:21 | Re: is any reason why only one columns subselect are allowed in array()? |
Previous Message | Tom Lane | 2008-11-18 18:02:08 | Re: is any reason why only one columns subselect are allowed in array()? |