Received: from balzac.cybercable.fr (balzac.cybercable.fr [212.198.0.198]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f16LLSx40662 for ; Tue, 6 Feb 2001 16:21:29 -0500 (EST) (envelope-from florent.guillaume@mail.com) Received: (qmail 11320541 invoked from network); 6 Feb 2001 21:21:25 -0000 Received: from s118.dhcp212-195.cybercable.fr (HELO smtp.noos.fr) ([212.198.195.118]) (envelope-sender ) by balzac.cybercable.fr (qmail-ldap-1.03) with SMTP for ; 6 Feb 2001 21:21:25 -0000 Received: (qmail 21893 invoked by uid 501); 6 Feb 2001 21:15:22 -0000 Date: Tue, 6 Feb 2001 22:15:22 +0100 From: Florent Guillaume To: tgl@sss.pgh.pa.us Cc: pgsql-hackers@postgresql.org, pgman@candle.pha.pa.us Subject: Re: [SQL] PL/PGSQL function with parameters Message-ID: <20010206221522.A21727@twin.efge.org> References: <7F124BC48D56D411812500D0B747251480F3D4@FILESERVER002> <7F124BC48D56D411812500D0B747251480F3D4@FILESERVER002> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0us X-Newsgroups: local.lists.postgresql.hackers In-Reply-To: <25204.981476161@sss.pgh.pa.us> Organization: None X-Archive-Number: 200102/199 X-Sequence-Number: 4330 > > SQL = ''SELECT * INTO temp1 FROM '' || $1; > > I tried this, and it seems that "SELECT ... INTO foo" is not executed > correctly by EXECUTE --- the INTO is handled as an ordinary select-into- > table construct rather than plpgsql's select-into-variable. > > While I have not looked closely, I seem to recall that plpgsql handles > INTO by stripping that clause out of the statement before it's passed to > the SQL engine. Evidently that's not happening in the EXECUTE case.