Search Postgresql Archives

Re: Functions returning multiple rowsets

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

 



Hello

2009/9/28 Thom Brown <thombrown@xxxxxxxxx>:
> Hi,
>
> Is it possible to create a function using 'SQL' as language which could
> return multiple rowsets, such as "SELECT * FROM TABLE1; SELECT * FROM
> TABLE2;" where both results are returned in the output?  I know this can be
> done in stored procedures in other RBDMS but can this be done in a function?
>

it is possible, but not directly. You can returns setof refcursors

see http://www.postgresql.org/docs/8.2/static/plpgsql-cursors.html

regards
Pavel Stehule

> Thanks
>
> Thom
>

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