Re: Can a function return a record set?

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: "John Taves" <jtaves(at)pickatime(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Can a function return a record set?
Date: 2001-02-23 15:34:42
Message-ID: web-1194176@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Mr. Taves,

> Am I correct in concluding that I can't return a record
> set from a function?
>
> For example, in MS SQL I would do:
>
> create procedure foo as
> select * from yada
>
> I expected to be able to do the following in postgresql.
>
> create function foo (integer) returns (integer) as '
> begin
> select * from yada;
> end; '
> language 'plpgsql';
>
> I am concluding that I can't.

You are correct. Stored procedures that return rowsets are
in the "wish list" for 7.2 or 8.0 ... but not in the current
development version. Please browse the archives (about 1-2
months ago) for my suggested workaround for the time being.

-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-02-23 15:41:34 Re: AW: ask for help !!! (emergency case)
Previous Message Olaf Zanger 2001-02-23 15:28:45 sum(bool)?