Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 0C0659FB1DD for ; Fri, 24 Nov 2006 11:23:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 77087-09 for ; Fri, 24 Nov 2006 11:23:24 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [216.148.227.153]) by postgresql.org (Postfix) with ESMTP id 7CF0C9FA5F0 for ; Fri, 24 Nov 2006 11:23:24 -0400 (AST) Received: from [192.168.0.9] (c-24-17-161-80.hsd1.wa.comcast.net[24.17.161.80]) by comcast.net (rwcrmhc13) with ESMTP id <20061124152322m13004np3ge>; Fri, 24 Nov 2006 15:23:22 +0000 From: Adrian Klaver Reply-To: aklaver@comcast.net To: pgsql-sql@postgresql.org Subject: Re: select into Date: Fri, 24 Nov 2006 07:26:05 -0800 User-Agent: KMail/1.6.2 Cc: Andreas Kretschmer References: <20061124042134.55885.qmail@web90512.mail.mud.yahoo.com> <200611240645.33431.aklaver@comcast.net> <20061124145519.GA5805@KanotixBox> In-Reply-To: <20061124145519.GA5805@KanotixBox> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200611240726.05395.aklaver@comcast.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/247 X-Sequence-Number: 26899 On Friday 24 November 2006 06:55 am, Andreas Kretschmer wrote: > Adrian Klaver schrieb: > > On Thursday 23 November 2006 08:45 pm, Tom Lane wrote: > > > Mulham freshcode writes: > > > > execute sql_str1 into svc_data_rec ; > > > > > > > > svc_data_rec is a RECORD, which is supposed to be dynamic. > > > > > > This should work --- in PG 8.1 or later. In older versions you'd have > > > to fool around with a FOR ... IN EXECUTE ... loop. > > > > > > regards, tom lane > > > > The documentation for pl/pgsql in 8.1 and higher says different. > > > > http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PL > >PGSQL-STATEMENTS-EXECUTING-DYN " SELECT INTO is not currently supported > > within EXECUTE." > > Thats right. The solution with 8.1 or later is: > > EXECUTE .... INTO var, and _not_ SELECT INTO var. > > > Andreas Thanks for the information. Somewhere along the line I missed the distinction. -- Adrian Klaver aklaver@comcast.net