or just return setof RECORD (version 7.4 +)
-- Original Message ---
From: Tony Wasson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: "Mark R. Dingee" <[EMAIL PROTECTED]>, pgsql-sql@postgresql.org
Sent: Fri, 22 Jul 2005 11:11:09 -0700
Subject: Re: [SQL] Mul
On 7/22/05, Jim Buttafuoco <[EMAIL PROTECTED]> wrote:
> Mark,
>
> Instead of RETURN NEXT rec.txt1; RETURN NEXT rec.txt2; just use RETURN NEXT
> rec;
>
> then your select statement would be
> select * from my_func() as (txt1 text,txt2 text);
>
> Jim
Besides a simple RETURN NEXT, you'll need to
l@postgresql.org
Sent: Fri, 22 Jul 2005 11:49:21 -0400
Subject: [SQL] Multi-column returns from pgsql
> Hi Everyone,
>
> Does anyone know if/how it's possible to return multi-column sets from a
> pgsql
> function? Right now I'm using something like the following as a wo
Hi Everyone,
Does anyone know if/how it's possible to return multi-column sets from a pgsql
function? Right now I'm using something like the following as a work around
CREATE OR REPLACE FUNCTION my_func() returns SETOF TEXT AS '
DECLARE
rec record;
BEGIN
FOR rec IN SELECT txt1, txt2 FRO