On Sun, Mar 12, 2023 at 9:57 PM David Adams <dpadams(at)gmail(dot)com> wrote:
> Thanks for the answer, a user error would be best case for me as then I
> can fix it.
>
Tom is probably on the right track here with psql versions.
I still say this shouldn't work per the documentation since "return" isn't
a valid SQL statement, if you want to use "begin atomic" write "SELECT
'result';" instead as the final statement of the function. The "return"
syntax is shown to only work with the "LANGUAGE SQL RETURN expression;"
format. Though since this does in fact work the docs probably should be
tweaked instead.
David J.