pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Ansley <Michael.Ansley@intec-telecom-systems.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: RE: plpgsql grief
Date: Mon, 12 Feb 2001 17:19:46 -0000
Message-ID: <7F124BC48D56D411812500D0B747251480F3FE@FILESERVER002> (raw)

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 <Michael.Ansley@intec-telecom-systems.com> 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
**********************************************************************

view thread (14+ messages)  latest in thread

Message-ID: <7F124BC48D56D411812500D0B747251480F3FE@FILESERVER002>
Permalink:  ../7F124BC48D56D411812500D0B747251480F3FE@FILESERVER002/
Also on:    postgresql.org/message-id/7F124BC48D56D411812500D0B747251480F3FE@FILESERVER002

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: Michael.Ansley@intec-telecom-systems.com, tgl@sss.pgh.pa.us
  Subject: Re: plpgsql grief
  In-Reply-To: <7F124BC48D56D411812500D0B747251480F3FE@FILESERVER002>
  References: <7F124BC48D56D411812500D0B747251480F3FE@FILESERVER002>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox