Skip to content

[BUG] JSQLParser Version : 5.3 RDBMS : PostgreSQL Parse error for EXPLAIN DELETE/UPDATE/INSERT #2373

@SuperPat45

Description

@SuperPat45

Failing SQL Feature:

  • The EXPLAIN statement seem to only works for SELECT statements

SQL Example:

  • Simplified Query Example, focusing on the failing feature
    EXPLAIN DELETE FROM test;

Software Information:

  • JSqlParser version 5.3
  • Database PostgreSQL version 17.7

Tips:

http://jsqlformatter.manticore-projects.com/jsqlformatter/demo.html?args=-c%20KIDQCgMgggkgcgAgCLAsAKsBAxASgeQFkEAXAUwGcSg$

The error is:

net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "FROM" "FROM"
at line 1, column 16.

Was expecting one of:

<EOF>
<ST_SEMICOLON>

at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:444)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:414)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:377)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:367)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions