returning a recordset from PLpg/SQL

From: Terence Kearns <terencek(at)isd(dot)canberra(dot)edu(dot)au>
To: pgsql-sql(at)postgresql(dot)org
Subject: returning a recordset from PLpg/SQL
Date: 2004-02-29 12:36:15
Message-ID: 4041DCBF.203@isd.canberra.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2004-02-29 15:11:48 Re: returning a recordset from PLpg/SQL
Previous Message Bruce Momjian 2004-02-29 02:44:58 Re: Enterprice support in PostgreSQL