Skip site navigation (1) Skip section navigation (2)

Re: BUG #5032: unexpected syntax error for plpgsql function returns table

From: Keith Cascio <keith(at)CS(dot)UCLA(dot)EDU>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5032: unexpected syntax error for plpgsql function returns table
Date: 2009-09-03 04:48:02
Message-ID: alpine.GSO.2.00.0909022142540.2576@kiwi.cs.ucla.edu (view raw or flat)
Thread:
Lists: pgsql-bugs
Pavel,

On Thu, 3 Sep 2009, Pavel Stehule wrote:

> it's not bug - PostgreSQL doesn't support parameter placeholder on this 
> position. Use dynamic query instead - plpgsql statement EXECUTE.

Thank you for your reply.  I appreciate your suggestion, but it still seems like 
a bug to me.  Please comment on the fact that the following code succeeds:

create function reproduce() returns table(foo integer) language plpgsql as
'begin return query select 1 bar; end;';

Output in psql is:
CREATE FUNCTION

Why should it succeed with "bar" but not with "foo"?

Thanks,
Keith


> 2009/9/3 Keith Cascio <keith(at)cs(dot)ucla(dot)edu>:
> > create function reproduce() returns table(foo integer) language plpgsql as
> > 'begin return query select 1 foo; end;';

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2009-09-03 05:01:44
Subject: Re: BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH
Previous:From: Pavel StehuleDate: 2009-09-03 03:27:46
Subject: Re: BUG #5032: unexpected syntax error for plpgsql function returns table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group