On Thu, Sep 3, 2009 at 12:48 AM, Keith Cascio<[email protected]> wrote: > 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"?
This is a very common gotcha in plpgsql. I always prefix function arguments and and locals with _; merlin -- Sent via pgsql-bugs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
