Skip to content

[BUG] JSQLParser 5.4-SNAPSHOT : PostgreSQL : "generated always as" regression in 5.4-SNAPSHOT #2324

@LouizFC

Description

@LouizFC

Always check against the Latest SNAPSHOT of JSQLParser and the Syntax Diagram

Failing SQL Feature:

  • 5.4-SNAPSHOT currently introduces a regression: "generated always as" or "generated by default" makes the parser fail when encountering the keywords in create table statements, previously (5.3) this information was just added to ColumnDefinition#getColumnSpecs

SQL Example:

  • Simplified Query Example, focusing on the failing feature
create table if not exists book_type (
  id bigint not null generated always as identity
);

throws

java.lang.RuntimeException: net.sf.jsqlparser.parser.ParseException: Encountered: <K_ALWAYS> / "always", at line 2, column 32, in lexical state DEFAULT.
Was expecting one of these terminals within expansion starting at 8213:17:
    <K_COMMA> (inside 8091:17) ...
    <CLOSING_BRACKET> (inside 8213:17) ...
    "." (inside 8553:13) ...
    "." (inside 8554:17) ...

Software Information:

  • JSqlParser 5.4-SNAPSHOT
  • Database PostgreSQL

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