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

From David G. Johnston
Subject Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC
Date
Msg-id CAKFQuwZVTWrjeh+a-7k8zgb2EhpMBHezFYE47odMdSZUZUPaKQ@mail.gmail.com
Whole thread Raw
In response to psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC  (David Adams <dpadams@gmail.com>)
Responses 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>)
List pgsql-bugs
On Sunday, March 12, 2023, David Adams <dpadams@gmail.com> wrote:

DROP FUNCTION IF EXISTS tools.tell_me_how_atomic();
CREATE OR REPLACE FUNCTION tools.tell_me_how_atomic()

RETURNS text

LANGUAGE SQL

BEGIN ATOMIC

return 'atomic';

END;

Not a bug, user-error.


There are two valid function body forms defined under “sql_body”.  Yours is neither of those.  Rewrite your body using one of those forms.  Removing being/end would make sense for this example.

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC
Next
From: David Adams
Date:
Subject: Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC