Thanks for the answer, a user error would be best case for me as then I can fix it.
I was hoping that cutting down my real routines to a simple example wouldn't introduce errors, maybe it did. The form I'm following is shown the docs like so:
```
BEGIN ATOMIC
statement;
statement;
...
statement;
END
```
My code is
```
BEGIN ATOMIC
return 'atomic';
END;
```
Apart from the final semi-colon, it's exactly the same form, as far as I can see. Taking the semi-colon out doesn't change anything.
In this toy example, `BEGIN ATOMIC` serves no purpose. In my real code, `BEGIN ATOMIC` is *very* helpful, as it puts table and column refernces into the autoamtic dependency tree.
Not sure what I'm missing here, hope it really is something simple.
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.