Search Postgresql Archives

Re: Record with a field consisting of table rows

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

 



On 14 Jan 2011, at 16:03, Jon Smark wrote:

> Hi,
> 
> This thread has veered off-topic, but my original problem still remains.
> Basically, I want to declare a function that returns a tuple consisting
> of an integer and a set of table rows.  Something like the following:
> 
> CREATE FUNCTION foobar () RETURNS (int4, SETOF users)
> 
> Now, if I understand correctly, the only way to have a function return
> a tuple is to create a named record and have the function return that
> record:


Nope, see my reply from yesterday around 20:23
You can return a table instead, with the count added as an extra column.

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4d308e2711871421280230!



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