From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Derrick Betts <Derrick(at)grifflink(dot)com> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Return a set of values from postgres Function |
Date: | 2003-07-20 06:20:00 |
Message-ID: | 20030719231726.S55138-100000@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Thu, 17 Jul 2003, Derrick Betts wrote:
> I want to get a set of values returned from a function. The values
> (there will need to be four of them) come from 4 separate SELECT
> statements inside the Function. For example SELECT one INTO variable1
> from table1 where ... then SELECT two INTO variable2 from table1
> where... At first you might think I could just combine the select
> statements into one statement, but I can't. I need to pass the
> results of each separate select statement into distinct variables and
> return them together to the application.
I'd suggest reading one of the items on the set returning functions:
http://www.varlena.com/GeneralBits/26.html
http://techdocs.postgresql.org/guides/SetReturningFunctions
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-07-20 06:26:28 | Re: min() and NaN |
Previous Message | Matthew Horoschun | 2003-07-20 06:19:07 | Re: SECURITY DEFINER changes CURRENT_USER? |