Re: Return Value of a Function - Mailing list pgsql-general

From Richard Huxton
Subject Re: Return Value of a Function
Date
Msg-id 200402021536.00027.dev@archonet.com
Whole thread Raw
In response to Return Value of a Function  (Terry Lee Tucker <terry@esc1.com>)
Responses Re: Return Value of a Function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Monday 02 February 2004 14:36, Terry Lee Tucker wrote:
>
> I may have several other things wrong with this function, so my real
> question is, "Can I return a value of type RECORD?"

Yes, but you can't necessarily do anything with it (unless you're calling it
from another function).

You could return a SETOF myrowtype where the set contains only one row -
that's probably what you're after. Then you can do things like:

SELECT * FROM set_returning_function(1,'a');

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: Alex
Date:
Subject: Select Question
Next
From: Jan Wieck
Date:
Subject: Re: DB cache size strategies