BUG #18403: PL/pgSQL is reporting unexpected errors when processing DECLARE blocks with <

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема BUG #18403: PL/pgSQL is reporting unexpected errors when processing DECLARE blocks with <
Дата
Msg-id CAKFQuwbf1aEjRKcxvhuVt=RO=HJLEEZqJCW_nigMiVxhTM9HSw@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #18403: PL/pgSQL is reporting unexpected errors when processing DECLARE blocks with <  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #18403: PL/pgSQL is reporting unexpected errors when processing DECLARE blocks with <  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-bugs
On Wednesday, March 20, 2024, PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      18403
Logged by:          Jiangshan Liu
Email address:      jiangshan.liu@tju.edu.cn
PostgreSQL version: 15.2
Operating system:   Ubuntu
Description:       

Hi, I think PL/pgSQL is reporting unexpected errors when dealing with
DECLARE blocks paired with <<label>>.
I have approximated the program to a clean situation. When I execute this
program, the PL/pgSQL engine does not report errors to me:

DO $$
DECLARE
DECLARE
    var1 INT = 1;
BEGIN
    RAISE NOTICE '%', var1;
END;
$$;


The failure to report an error here seems contrary to the documentation.  When the end of the DO text is reached and only a single begin/end pair is seen the parser is being loose in being OK that one of the declares was not associated with a full block.

David J.

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: BUG #18403: PL/pgSQL is reporting unexpected errors when processing DECLARE blocks with <
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: BUG #18403: PL/pgSQL is reporting unexpected errors when processing DECLARE blocks with <