Re: plpgsql grief

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Ansley <Michael(dot)Ansley(at)intec-telecom-systems(dot)com>
Cc: "'rob'" <rob(at)dsvr(dot)net>, pgsql-sql(at)postgresql(dot)org
Subject: Re: plpgsql grief
Date: 2001-02-12 16:46:25
Message-ID: 18843.981996385@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-02-12 17:09:48 Re: plpgsql grief
Previous Message Tom Lane 2001-02-12 16:45:18 Re: plpgsql grief