From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Derrick Betts <Derrick@grifflink.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Return a set of values from postgres Function
Date: Sat, 19 Jul 2003 23:20:00 -0700 (PDT)
Message-ID: <20030719231726.S55138-100000@megazone.bigpanda.com> (raw)
In-Reply-To: <00b301c34cb5$346b1390$0100a8c0@BigOne>
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.htmlhttp://techdocs.postgresql.org/guides/SetReturningFunctions
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone.bigpanda.com, Derrick@grifflink.com
Subject: Re: Return a set of values from postgres Function
In-Reply-To: <20030719231726.S55138-100000@megazone.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox