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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC
Дата
Msg-id 1669793.1678683562@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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
Список pgsql-bugs
David Adams <dpadams@gmail.com> writes:
> As far as I know, the problem only shows up with reading in a file with -f
> or <: That's a bit different to entering the lines one by one.

No joy on that either ...

$ cat test.sql 
CREATE OR REPLACE FUNCTION tell_me_how_atomic()
RETURNS text
LANGUAGE SQL
BEGIN ATOMIC
return 'atomic';
END;
$ psql -f test.sql
CREATE FUNCTION
$ cat test.sql | psql
CREATE FUNCTION

> I've checked again, and can't find any gremlins/invisible characters in the
> source file, attached. And, this only happens with scripts that use BEGIN
> ATOMIC, and it seems to happen on all of those files.

Are you entirely sure you're using a new-enough psql?  I can replicate
your symptom if I try to use v13 psql to send this command to a
v14-or-later server.

            regards, tom lane



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

Предыдущее
От: David Adams
Дата:
Сообщение: 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