Is there an existing issue for this?
Library Version
6.1.5
What happened?
Looks like function bodies in CREATE FUNCTION are split into multiple statements, which causes it to fail due to invalid syntax. For example
CREATE FUNCTION identity.get_random() RETURNS double precision
LANGUAGE sql
IMMUTABLE STRICT PARALLEL SAFE
BEGIN ATOMIC
SELECT random();
END;
is split into 2 statements
CREATE FUNCTION identity.get_random() RETURNS double precision
LANGUAGE sql
IMMUTABLE STRICT PARALLEL SAFE
BEGIN ATOMIC
SELECT random()
and
If the function contains multiple statements, each is split into a separate statement as well.
Relevant log output