From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Keith Cascio <keith(at)cs(dot)ucla(dot)edu> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5032: unexpected syntax error for plpgsql function returns table |
Date: | 2009-09-03 06:31:53 |
Message-ID: | 162867790909022331g6f676e36x6dfe30445661e3cf@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
2009/9/3 Keith Cascio <keith(at)cs(dot)ucla(dot)edu>:
> 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"?
because bar isn't declared as variable
regards
Pavel
>
> 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;';
>
From | Date | Subject | |
---|---|---|---|
Next Message | Keith Cascio | 2009-09-03 06:39:35 | Re: BUG #5032: unexpected syntax error for plpgsql function returns table |
Previous Message | Tom Lane | 2009-09-03 05:24:27 | Re: BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH |