X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 057823A5F2C for ; Thu, 27 Jan 2005 16:10:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79737-02 for ; Thu, 27 Jan 2005 16:10:50 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id F2BAB3A5F2E for ; Thu, 27 Jan 2005 16:10:48 +0000 (GMT) Received: (qmail-ldap/ctrl 19939 invoked from network); 27 Jan 2005 16:10:42 -0000 Received: from unknown (HELO jupiter.sonorys.at) ([213.235.243.42]) (envelope-sender ) by mx-00.sil.at (qmail-ldap-1.03) with SMTP for ; 27 Jan 2005 16:10:42 -0000 Received: from neptun.sonorys.at (neptun.sonorys.at [172.24.1.17]) by jupiter.sonorys.at (8.11.7+Sun/8.11.7) with ESMTP id j0RGAws25213 for ; Thu, 27 Jan 2005 17:10:58 +0100 (MET) Received: by neptun.sonorys.at with Internet Mail Service (5.5.2653.19) id ; Thu, 27 Jan 2005 17:10:45 +0100 Message-ID: From: =?ISO-8859-1?Q?K=D6PFERL_Robert?= To: Cc: pgsql-sql@postgresql.org Subject: Re: What's the equivalent in PL/pgSQL Date: Thu, 27 Jan 2005 17:10:45 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200501/295 X-Sequence-Number: 20083 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=E4nner 2005 14:57 > To: K=D6PFERL Robert > Cc: pgsql-sql@postgresql.org > Subject: Re: [SQL] What's the equivalent in PL/pgSQL >=20 >=20 > See this section of the manual: >=20 > http://www.postgresql.org/docs/8.0/interactive/plpgsql-control-=20 > structures.html >=20 > In particular, look at 35.7.1.2 and 35.7.4. I think you need=20 > to loop =20 > through the results of the query in order to return them. If=20 > you just =20 > want to return the result set as a whole to another function=20 > that needs =20 > to work with the data, you can use a cursor. >=20 > Sean >=20 > On Jan 27, 2005, at 7:46 AM, K=D6PFERL Robert wrote: >=20 > > 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 =20 > > second and > > third temporal table? > > > > ---------------------------(end of =20 > > broadcast)--------------------------- > > TIP 6: Have you searched our list archives? > > > > http://archives.postgresql.org >=20