From: Terence Kearns <terencek@isd.canberra.edu.au>
To: pgsql-sql@postgresql.org
Subject: returning a recordset from PLpg/SQL
Date: Sun, 29 Feb 2004 23:36:15 +1100
Message-ID: <4041DCBF.203@isd.canberra.edu.au> (raw)
Looking at the datatypes you can RETURN, it doesn't seem that there is a
way to return a recordset
I tried
RETURNS SETOF RECORD
but that doesn't work
I even tried
RETURNS SETOF fooTable%ROWTYPE
What I would like to do is not that simple, I need to be able to
build/declare a record definition with an arbitary list of columns and
then return a set of that record which has it's values populated by
queries and calculations inside the procedure.
returning an array is not a solution because I need to name all the
columns and they will have different data types.
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: terencek@isd.canberra.edu.au
Subject: Re: returning a recordset from PLpg/SQL
In-Reply-To: <4041DCBF.203@isd.canberra.edu.au>
* 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