From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Adams <dpadams(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC |
Date: | 2023-03-13 04:59:22 |
Message-ID: | 1669793.1678683562@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
David Adams <dpadams(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2023-03-13 05:04:17 | Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC |
Previous Message | David Adams | 2023-03-13 04:56:49 | Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC |