In Postgres function created by CREATE FUNCTION can be schema qualified. sqlgg doesn't support that and fails to parse such statement. CREATE PROCEDURE can also be schema qualified.
CREATE OR REPLACE FUNCTION ns.add(i INT, j INT) RETURNS INT AS $$
BEGIN
RETURN i + j;
END;
$$ LANGUAGE plpgsql;
SELECT ns.add(2);
The error I get:
==> CREATE OR REPLACE FUNCTION ns.add(i INT, j INT) RETURNS INT AS $$
BEGIN
RETURN i + j;
END;
$$ LANGUAGE plpgsql
Position 1:30 Tokens: .add(i INT, j INT) RETURNS INT AS
Error: Sqlgg.Sql_parser.MenhirBasics.Error
==> SELECT ns.add(2)
Position 1:13 Tokens: add(2)
Error: Sqlgg.Sql_parser.MenhirBasics.Error
Errors encountered, no code generated
In Postgres function created by
CREATE FUNCTION
can be schema qualified.sqlgg
doesn't support that and fails to parse such statement.CREATE PROCEDURE
can also be schema qualified.https://www.postgresql.org/docs/current/sql-createfunction.html
The error I get: