Search Postgresql Archives

Re: join from array or cursor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 21, 2009 at 12:05:51PM -0400, Tom Lane wrote:
> Sam Mason <sam@xxxxxxxxxxxxx> writes:
> > ... PG should instead arrange that the expression
> > "t" is run exactly once and reuse the single result for all columns.
> 
> We might be able to do that based on the row-returning-subselect
> infrastructure being discussed over here:
> http://archives.postgresql.org/message-id/4087.1250867036@xxxxxxxxxxxxx

Huh, fun.  Not sure if I'm interpreting this correctly, but what would
the difference in semantics between:

  SELECT (SELECT 1,2);

and

  SELECT (SELECT (1,2));

PG seems to make the distinction somewhat blurry at the moment.  For
example, upthread I did:

  SELECT (id((SELECT (1,2)::foo))).*;

and got back two columns, and yet when I do what I think is equivalent:

  SELECT x.*
  FROM (SELECT (1,2)::foo) x;

I get back my tuple, and not the values inside my tuple.


Should I be posting this to -hackers?

-- 
  Sam  http://samason.me.uk/

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux