Search Postgresql Archives

Re: Can a function return more then one table?

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

 



Hello

2012/1/11 Mike Christensen <mike@xxxxxxxxxxxxx>:
> I would like to write a function that returns one row from one table,
> and about 10 rows or so from another table..
>
> Is there a clean way to do this, or am I better off making two separate queries?
>
> I'm thinking maybe I can use OUT parameters for the first table, and
> the return value for the second table?  However, I have no idea what
> the syntax would be like.
>

what is possible

* return setof refcursors
* use arrays instead tables and returns arrays (for tables less 10000 rows)

Regards

Pavel Stehule

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

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