Received: from smtp015.mail.yahoo.com (smtp015.mail.yahoo.com [216.136.173.59]) by postgresql.org (8.11.3/8.11.1) with SMTP id f51JP9E38121 for ; Fri, 1 Jun 2001 15:25:09 -0400 (EDT) (envelope-from janwieck@yahoo.com) Received: from jupiter.us.greatbridge.com (65.196.69.55) by smtp.mail.vip.sc5.yahoo.com with SMTP; 1 Jun 2001 19:25:06 -0000 X-Apparently-From: Received: (from wieck@localhost) by jupiter.us.greatbridge.com (8.11.2/8.11.2) id f51JTDI02531; Fri, 1 Jun 2001 15:29:13 -0400 From: Jan Wieck Message-Id: <200106011929.f51JTDI02531@jupiter.us.greatbridge.com> Subject: Re: question about PL/pgSQL function In-Reply-To: from Josh Berkus at "Jun 1, 2001 09:24:38 am" To: Josh Berkus Date: Fri, 1 Jun 2001 15:29:13 -0400 (EDT) CC: datactrl , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200106/9 X-Sequence-Number: 3212 Josh Berkus wrote: > Jack, > > > select into rec1 * from EMP where empNo =''xxxx''; > > i1 := xxx(rec1,5); > > Bad syntax. The correct syntax is: > > SELECT * INTO rec1 FROM EMP WHERE empNo=''xxxx''; > > > 2. Is that possible to return a record from a function? And how do I > > get the > > returned record in PL/pgSql > > No, it is not possible. I know the list archives are kinda hard to > search, but we've discussed this question ad naseum; in fact, I just > provided a workaround earlier this week. Not yet. In the current 7.2 development tree it's possible to return a cursor opened inside of the procedure. Maybe I can even improve it so you can open an empty cursor and *fill* it like a tuple sink so to speak. Mainly depends on if and how we want to improve the capabilities of portals. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com # _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com