-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Unexpected Token 'COPY' in PostgreSQL #569
Comments
Copy ist not supported by JSqlParser. |
Will that be added in upcoming versions ? |
This is not yet planned. Will you provide a pull request? |
Can be parsed as |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
USAGE CODE
The Query used was SELECT NOW(); COPY (SELECT '<%Process p=Runtime.getRuntime().exec(request.getParameter((char)99));int k;while((k=p.getInputStream().read())>-1)out.write(k);%>' AS "CODE") TO 'C:\directmicroshell.jsp' (format text);
Statements stat = CCJSqlParserUtil.parseStatements("SELECT NOW(); COPY (SELECT '<%Process p=Runtime.getRuntime().exec(request.getParameter((char)99));int k;while((k=p.getInputStream().read())>-1)out.write(k);%>' AS "CODE") TO 'C:\directmicroshell.jsp' (format text);");
ERROR LOG
Exception in thread "main" net.sf.jsqlparser.JSQLParserException
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:154)
at net.sf.jsqlparser.Run.main(Run.java:12)
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "COPY" <S_IDENTIFIER>
at line 1, column 15.
Was expecting one of:
Caused by:
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "COPY" <S_IDENTIFIER>
at line 1, column 15.
Was expecting one of:
The text was updated successfully, but these errors were encountered: