RE: plpgsql grief

From: Michael Ansley <Michael(dot)Ansley(at)intec-telecom-systems(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: RE: plpgsql grief
Date: 2001-02-12 17:19:46
Message-ID: 7F124BC48D56D411812500D0B747251480F3FE@FILESERVER002
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)sss(dot)pgh(dot)pa(dot)us]
Sent: 12 February 2001 16:46
To: Michael Ansley
Cc: 'rob'; pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] plpgsql grief

Michael Ansley <Michael(dot)Ansley(at)intec-telecom-systems(dot)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
**********************************************************************

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-02-12 17:20:33 Re: plpgsql grief
Previous Message Josh Berkus 2001-02-12 17:12:07 Re: plpgsql grief