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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: David Adams <dpadams(at)gmail(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <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:47:26
Message-ID: CAKFQuwZVTWrjeh+a-7k8zgb2EhpMBHezFYE47odMdSZUZUPaKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sunday, March 12, 2023, David Adams <dpadams(at)gmail(dot)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.

https://www.postgresql.org/docs/current/sql-createfunction.html

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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Adams 2023-03-13 04:49:26 Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC
Previous Message Tom Lane 2023-03-13 04:34:41 Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC