Re: calling a function over several rows - Mailing list pgsql-general

From Pavel Stehule
Subject Re: calling a function over several rows
Date
Msg-id 162867790911162217n77cd3148i1048bc753ff0b1a8@mail.gmail.com
Whole thread Raw
In response to calling a function over several rows  (Adam Rich <adam.r@sbcglobal.net>)
List pgsql-general
2009/11/17 Adam Rich <adam.r@sbcglobal.net>:
> 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
>

Hello,

attention, relation databases isn't spreadsheet. There isn't any
shortcut. You can write function based on information_schema.colums
that helps with generating SQL statement.

Regards
Pavel Stehule

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

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: calling a function over several rows
Next
From: Nathan Jahnke
Date:
Subject: plperl: spi_query_prepared/spi_fetchrow versus spi_exec_prepared: memory?