Re: How do you return more than one variable in a plpgsql function? - Mailing list pgsql-sql

From Vincent AE Scott
Subject Re: How do you return more than one variable in a plpgsql function?
Date
Msg-id 20020208021332.W25018@majestic.ukshells.co.uk
Whole thread Raw
In response to How do you return more than one variable in a plpgsql function?  (Mark Nielsen <python@kepnet.net>)
List pgsql-sql
Mark Nielsen(python@kepnet.net)@Thu, Feb 07, 2002 at 03:43:40PM -0500:
> I have never figured out how to make a plpgsql function return more than 
> one variable or type. I read something where a function an return an 
> open cursor, but I never figured out how. I want a function to be able 
> to return an entire row of a table or a number of fields from different 
> tables using plpgsql.
> 
> How can I do that?
> Thanks!
> Mark

i'm certainly no expert on postgres, but one option i can think of,
would be to insert the data into a 'temporary' table.  then return the
unique ID for that data.

certainly not perfect, but flexible.

HTH,
-vince

-- 
PGP key:  http://codex.net/pgp/pgp.asc
Computers make very fast, very accurate mistakes.



pgsql-sql by date:

Previous
From: Mark Nielsen
Date:
Subject: Re: Help with a SQL query
Next
From: Bill Cunningham
Date:
Subject: Re: Help with a SQL query