Re: BUG #5352: Bug in PL/PgSQL "SELECT .. INTO" statement parser

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: BUG #5352: Bug in PL/PgSQL "SELECT .. INTO" statement parser
Дата
Msg-id 34d269d41003010724s7f51e4d2uebb2f9143617f890@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #5352: Bug in PL/PgSQL "SELECT .. INTO" statement parser  ("Oleg" <serovov@gmail.com>)
Список pgsql-bugs
On Mon, Mar 1, 2010 at 02:22, Oleg <serovov@gmail.com> wrote:
> CREATE OR REPLACE FUNCTION "bug" () RETURNS pg_catalog.void AS
> $body$
> DECLARE
> =C2=A0 row_test1 test1%rowtype;
> =C2=A0 row_test2 test2%rowtype;
> BEGIN
> =C2=A0 SELECT test1, chunk_id
> =C2=A0 =C2=A0 =C2=A0 FROM test1 JOIN test2 ON(chunk.id =3D test2.chunk_id)
> =C2=A0 =C2=A0 =C2=A0 LIMIT 1
> =C2=A0 =C2=A0 =C2=A0 INTO row_test1, row_test2;

*shrug* it works if you put the INTO after SELECT. From the manual:

http://www.postgresql.org/docs/current/static/plpgsql-statements.html#PLPGS=
QL-SELECT-INTO

: The INTO clause can appear almost anywhere in the SQL command.
Customarily it is written either just before or just
: after the list of select_expressions in a SELECT command, or at the
end of the command for other command types.
: It is recommended that you follow this convention in case the
PL/pgSQL parser becomes stricter in future versions.

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: BUG #5338: PG_DUMP fails due to invalid adnum value
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5352: Bug in PL/PgSQL "SELECT .. INTO" statement parser