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 9:22 AM, Greg Stark<gsstark@xxxxxxx> wrote:
> Of course immediately upon hitting send I did think of a way:
>
>  SELECT (r).*
>  FROM (SELECT (SELECT x FROM x WHERE a=id) AS r
>          FROM unnest(array[1,2]) AS arr(id)
>       ) AS subq;

nice use of composite type in select-list subquery.   I use this
approach often...it's a 'wonder trick'.

merlin

-- 
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