You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] JSQLParser 4.9 fails to parse subsequent statements after parsing FUNCTION statement #1994
I am using the JSQLParser4.9 tool to parse SQL DDL statements, but I encountered a problem when parsing the following statement:
SQL Example:
Simplified Query Example, focusing on the failing feature
-- Replace with your ACTUAL exampleDROPFUNCTION IF EXISTS "fin"."restore_fund_data"("in_fund_id" int8);
CREATE OR REPLACEFUNCTION "fin"."restore_fund_data"("in_fund_id" int8)
RETURNS "pg_catalog"."varchar"AS $BODY$
DECLARE
message VARCHAR;
open rec_cur;
close proj_info_cur;
********
RETURN 'success';
END $BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
Activity
manticore-projects commentedon Apr 19, 2024
Greetings.
Both statements get parsed and no error message is thrown.
What exactly is the challenge please?
kxed commentedon Apr 19, 2024
The "INDEX" keyword also failed to convert.
Software Information:
kxed commentedon Apr 19, 2024
Executing the following code will throw an exception.
Exception Info:
c.s.g.util.sqlparse.BaseSqlParser : net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "end" "END"
at line 2259, column 2.
Was expecting one of: