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

[BUG] JSQLParser 4.5 : Postgres : fails to parse interval hour to minute #1728

Open
dguy opened this issue Feb 13, 2023 · 0 comments
Open

[BUG] JSQLParser 4.5 : Postgres : fails to parse interval hour to minute #1728

dguy opened this issue Feb 13, 2023 · 0 comments

Comments

@dguy
Copy link

dguy commented Feb 13, 2023

Failing SQL Feature:

When parsing an example (taken from the postgres website: https://www.postgresql.org/docs/current/sql-createtable.html) that uses interval hour to minute in CREATE TABLE... parsing fails with:

Failed to parse query. Proceeding with query execution
net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: "hour" <K_DATE_LITERAL>
    at line 7, column 26.

SQL Example:

CREATE TABLE films (
    code        char(5),
    title       varchar(40),
    did         integer,
    date_prod   date,
    kind        varchar(10),
    len         interval hour to minute,
    CONSTRAINT production UNIQUE(date_prod)
);

Software Information:

  • JSqlParser 4.5
  • PostgreSQL
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