Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id F02079FA089 for ; Fri, 24 Nov 2006 11:14:49 -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-02 for ; Fri, 24 Nov 2006 11:14:46 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from 137086.vserver.de (vs137086.vserver.de [62.75.137.86]) by postgresql.org (Postfix) with ESMTP id DEEB99FA5F0 for ; Fri, 24 Nov 2006 10:54:45 -0400 (AST) Received: from a-kretschmer.de (p54B387D5.dip0.t-ipconnect.de [84.179.135.213]) (authenticated bits=0) by 137086.vserver.de (8.12.8/8.12.8) with ESMTP id kAOEsp7X006039 for ; Fri, 24 Nov 2006 15:54:52 +0100 Received: from kretschmer by a-kretschmer.de with local (Exim 4.61) (envelope-from ) id 1GncSV-0001l3-D8 for pgsql-sql@postgresql.org; Fri, 24 Nov 2006 15:55:19 +0100 Date: Fri, 24 Nov 2006 15:55:19 +0100 From: Andreas Kretschmer To: pgsql-sql@postgresql.org Subject: Re: select into Message-ID: <20061124145519.GA5805@KanotixBox> References: <20061124042134.55885.qmail@web90512.mail.mud.yahoo.com> <28318.1164343519@sss.pgh.pa.us> <200611240645.33431.aklaver@comcast.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200611240645.33431.aklaver@comcast.net> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: mutt-ng 1.5.9i (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/246 X-Sequence-Number: 26898 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#PLPGSQL-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 -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknow) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°