Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解析postgresql得删除函数语法报错 #5922

Open
huangyao229328404 opened this issue May 16, 2024 · 0 comments
Open

解析postgresql得删除函数语法报错 #5922

huangyao229328404 opened this issue May 16, 2024 · 0 comments

Comments

@huangyao229328404
Copy link

dbtype: postgresql
dbversion: 12
druid verion: 1.2.22
error sql: DROP FUNCTION IF EXISTS add_numbers(a integer) 或者 DROP FUNCTION add_numbers()
testcase code:

String sql = "DROP FUNCTION IF EXISTS add_numbers(a integer)";

SQLStatementParser parser = new SQLStatementParser(sql, DbType.postgresql);
SQLStatement sqlStatement = parser.parseStatement();

stacktrace info:

Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: not supported.pos 23, line 1, column 18, token EXISTS
	at com.alibaba.druid.sql.parser.SQLStatementParser.checkEndToken(SQLStatementParser.java:4983)
	at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatement(SQLStatementParser.java:4973)

Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: not supported.pos 26, line 1, column 26, token (
	at com.alibaba.druid.sql.parser.SQLStatementParser.checkEndToken(SQLStatementParser.java:4983)
	at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatement(SQLStatementParser.java:4973)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant