pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: KÖPFERL Robert <robert.koepferl@sonorys.at>
Cc: pgsql-sql@postgresql.org
Subject: Re: What's the equivalent in PL/pgSQL
Date: Thu, 27 Jan 2005 17:10:45 +0100
Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB16592@neptun.sonorys.at> (raw)

That's bad.
Is there really no ohter way?
So it takes TWO termoral tables. Or even more?

And it can't be just sql because theres more around that statement.

> -----Original Message-----
> From: Sean Davis [mailto:sdavis2@mail.nih.gov]
> Sent: Donnerstag, 27. Jänner 2005 14:57
> To: KÖPFERL Robert
> Cc: pgsql-sql@postgresql.org
> Subject: Re: [SQL] What's the equivalent in PL/pgSQL
> 
> 
> 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
> 



view thread (4+ messages)  latest in thread

Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB16592@neptun.sonorys.at>
Permalink:  ../ED4E30DD9C43D5118DFB00508BBBA76EB16592@neptun.sonorys.at/
Also on:    postgresql.org/message-id/ED4E30DD9C43D5118DFB00508BBBA76EB16592@neptun.sonorys.at

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: robert.koepferl@sonorys.at
  Subject: Re: What's the equivalent in PL/pgSQL
  In-Reply-To: <ED4E30DD9C43D5118DFB00508BBBA76EB16592@neptun.sonorys.at>
  References: <ED4E30DD9C43D5118DFB00508BBBA76EB16592@neptun.sonorys.at>

* 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