Closed
Description
PG14 added a new syntax for creating SQL functions that we should support with PostgresqlSqlLexer
CREATE OR REPLACE FUNCTION asterisks(n int)
RETURNS SETOF text
LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE
BEGIN ATOMIC
SELECT repeat('*', g) FROM generate_series (1, n) g; -- <-- Note this semicolon
END;
Right now, PostgresqlSqlLexer.tokenize(…)
identifies this above as two statements. See also: