Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC
Дата
Msg-id CAKFQuwb-S06v-sSs-PekfPRZ8caV9H+R3F+Sv02podWrHO6vjA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC  (David Adams <dpadams@gmail.com>)
Ответы Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC  (David Adams <dpadams@gmail.com>)
Список pgsql-bugs
On Sun, Mar 12, 2023 at 9:57 PM David Adams <dpadams@gmail.com> wrote:
Thanks for the answer, a user error would be best case for me as then I can fix it.

Tom is probably on the right track here with psql versions.

I still say this shouldn't work per the documentation since "return" isn't a valid SQL statement, if you want to use "begin atomic" write "SELECT 'result';" instead as the final statement of the function.  The "return" syntax is shown to only work with the "LANGUAGE SQL RETURN expression;" format.  Though since this does in fact work the docs probably should be tweaked instead.

David J.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC
Следующее
От: David Adams
Дата:
Сообщение: Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC