Re: calling a function over several rows

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Adam Rich <adam(dot)r(at)sbcglobal(dot)net>
Cc: postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: Re: calling a function over several rows
Date: 2009-11-17 06:15:43
Message-ID: b42b73150911162215i72a2ae0bg5d6fe38e73dfefe4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 17, 2009 at 1:02 AM, Adam Rich <adam(dot)r(at)sbcglobal(dot)net> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2009-11-17 06:17:02 Re: calling a function over several rows
Previous Message Adam Rich 2009-11-17 06:02:26 calling a function over several rows