Can a function return more then one table?

From: Mike Christensen <mike(at)kitchenpc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Can a function return more then one table?
Date: 2012-01-11 06:42:22
Message-ID: CABs1bs3d2vRmv9WtFfNnxu2j30Tc4F-P-f3Yooyif0imSLfMqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Mike

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2012-01-11 06:47:38 Re: Can a function return more then one table?
Previous Message Kevin Duffy 2012-01-11 06:10:28 pgAdmin - Query - out of memory for query result