Re: What's the equivalent in PL/pgSQL - Mailing list pgsql-sql

From Sean Davis
Subject Re: What's the equivalent in PL/pgSQL
Date
Msg-id 569F6E64-706B-11D9-8FBF-000D933565E8@mail.nih.gov
Whole thread Raw
In response to What's the equivalent in PL/pgSQL  (KÖPFERL Robert <robert.koepferl@sonorys.at>)
List pgsql-sql
See this section of the manual:

http://www.postgresql.org/docs/8.0/interactive/plpgsql-control-
structures.html

In particular, look at 35.7.1.2 and 35.7.4.  I think you need to loop
through the results of the query in order to return them.  If you just
want to return the result set as a whole to another function that needs
to work with the data, you can use a cursor.

Sean

On Jan 27, 2005, at 7:46 AM, KÖPFERL Robert wrote:

> Hi,
> I'm trying to find an equivalent plpgsql function as this:
>
> func x returns SETOF "Tablename" AS
> '
> Select * from "Tablename";
> ' language sql
>
>
> How is this accomplished with plpgsql while not using a loop or a
> second and
> third temporal table?
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org



pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Foreign Key relationship between two databases
Next
From: Dawid Kuroczko
Date:
Subject: Re: [GENERAL] Foreign Key relationship between two databases