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

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: BUG #5032: unexpected syntax error for plpgsql function returns table
Дата
Msg-id 162867790909022331g6f676e36x6dfe30445661e3cf@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #5032: unexpected syntax error for plpgsql function returns table  (Keith Cascio <keith@CS.UCLA.EDU>)
Ответы Re: BUG #5032: unexpected syntax error for plpgsql function returns table  (Keith Cascio <keith@CS.UCLA.EDU>)
Список pgsql-bugs
2009/9/3 Keith Cascio <keith@cs.ucla.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. =C2=A0I appreciate your suggestion, but it stil=
l seems like
> a bug to me. =C2=A0Please comment on the fact that the following code suc=
ceeds:
>
> 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@cs.ucla.edu>:
>> > create function reproduce() returns table(foo integer) language plpgsq=
l as
>> > 'begin return query select 1 foo; end;';
>

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Mark Douglas
Дата:
Сообщение: Re: BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH
Следующее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: [NOVICE] psql: FATAL: the database system is in recovery mode