Search Postgresql Archives

Re: calling a function over several rows

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

 



Merlin Moncure wrote:
On Tue, Nov 17, 2009 at 1:02 AM, Adam Rich <adam.r@xxxxxxxxxxxxx> wrote:
Hello,
There is an existing function which takes an integer and returns a record.
 I need to call this function with every integer in a table.  Is there a
simple shortcut for doing this?

I'm looking for something like:

select f.*
from function(t.value) f, table t

select (f).* from (select function(t.value) as f from table t) q;

merlin


Thanks, that's perfect, and much faster than the one I came up with in the interim:

select (f(t.value)).* from table t;



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