Received: from fileserver002.intecsystems.co.uk ([194.200.14.125]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1CHFvx32130 for ; Mon, 12 Feb 2001 12:15:57 -0500 (EST) (envelope-from Michael.Ansley@intec-telecom-systems.com) Received: from fileserver002.intecsystems.co.uk (unverified) by fileserver002.intecsystems.co.uk (Content Technologies SMTPRS 4.1.5) with ESMTP id ; Mon, 12 Feb 2001 17:19:46 +0000 Received: by FILESERVER002 with Internet Mail Service (5.5.2650.21) id <1T5HAA4Q>; Mon, 12 Feb 2001 17:19:46 -0000 Message-ID: <7F124BC48D56D411812500D0B747251480F3FE@FILESERVER002> From: Michael Ansley To: "'Tom Lane'" Cc: pgsql-sql@postgresql.org Subject: RE: plpgsql grief Date: Mon, 12 Feb 2001 17:19:46 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative ; boundary="----_=_NextPart_001_01C09517.FF4F87C4" X-Archive-Number: 200102/220 X-Sequence-Number: 1411 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C09517.FF4F87C4 Content-Type: text/plain; charset="iso-8859-1" I thought that the discussion on this topic resolved that the AS syntax would work as I described, and the INTO syntax would be removed because of ambiguity, to be redeveloped at a later date? -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: 12 February 2001 16:46 To: Michael Ansley Cc: 'rob'; pgsql-sql@postgresql.org Subject: Re: [SQL] plpgsql grief Michael Ansley writes: > create function testfunc (text) returns int4 as ' > declare > sql varchar; > begin > sql=''SELECT id AS res2 FROM ''||$1 ; > execute sql ; > return res2; > end; > ' language 'plpgsql' ; > Please note the AS syntax rather than INTO. That won't work :-( regards, tom lane ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify Nick West - Global Infrastructure Manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ------_=_NextPart_001_01C09517.FF4F87C4 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [SQL] plpgsql grief

I thought that the discussion on this topic resolved that= the AS syntax would work as I described, and the INTO syntax would be remo= ved because of ambiguity, to be redeveloped at a later date?

-----Original Message-----
From: Tom Lane [mai= lto:tgl@sss.pgh.pa.us]
Sent: 12 February 2001 16:46
To: Michael Ansley
Cc: 'rob'; pgsql-sql@postgresql.org
Subject: Re: [SQL] plpgsql grief


Michael Ansley <Michael.Ansley@intec-telecom-systems.c= om> writes:
> create function testfunc (text) returns int4 as '
> declare
>   sql varchar;
> begin
>   sql=3D''SELECT id AS res2 FROM ''||$1 ;=
>   execute sql ;
>   return res2;
> end;
> ' language 'plpgsql' ;

> Please note the AS syntax rather than INTO.

That won't work :-(

             = ;           reg= ards, tom lane



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
Nick West - Global Infrastructure Manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************
------_=_NextPart_001_01C09517.FF4F87C4--