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 Tom Lane
Subject Re: psql 14.7/15.2 report a bogus syntax error on function and procedure files that use BEGIN ATOMIC
Date
Msg-id 1666633.1678682081@sss.pgh.pa.us
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
David Adams <dpadams@gmail.com> writes:
> CREATE OR REPLACE FUNCTION tools.tell_me_how_atomic()
> RETURNS text
> LANGUAGE SQL
> BEGIN ATOMIC
> return 'atomic';
> END;
> [ throws a syntax error ]

This works for me.  I wonder if you have some issues with bogus
invisible characters in your actual input file.  Copying and
pasting from your mail (but removing the schema name for
convenience), I got

regression=# CREATE OR REPLACE FUNCTION tell_me_how_atomic()
regression-# 
regression-# RETURNS text
regression-# 
regression-# LANGUAGE SQL
regression-# 
regression-# BEGIN ATOMIC
regression-# 
regression-# return 'atomic';
regression-# 
regression-# END;
CREATE FUNCTION
regression=# select * from tell_me_how_atomic()
regression-# ;
 tell_me_how_atomic 
--------------------
 atomic
(1 row)

            regards, tom lane



pgsql-bugs by date:

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