Skip to content

[BUG] JSQLParser 5.4 PostgreSQL treats the WITH and BY in CREATE SEQUENCE expressions as optional #2347

Description

@mjog

Failing SQL Feature:

PostgreSQL treats the WITH in CREATE SEQUENCE name START WITH … expressions as optional. At least one SQL generator (Hibernate) is generating PostgreSQL-specific SQL when creating new sequences, without the WITH.

SQL Example:

CREATE SEQUENCE example_seq START 1 INCREMENT 1;

Software Information:

PostgreSQL 7.1 through to current (7.x did not support WITH at all, which is maybe why Hibernate is not including it)

JSqlParser version: 4.9 (this project still requires Java 8 for the moment, unfortunately)

However, JSqlParser 5.4-SNAPSHOT still requires it:

Image

Activity

  1. changed the title [-][BUG] JSQLParser Version : RDBMS : failing feature description[/-] [+][BUG] JSQLParser 5.4 PostgreSQL treats the WITH in CREATE SEQUENCE name START WITH … expressions as optional[/+] on Nov 21, 2025
  2. added a commit that references this issue on Nov 21, 2025
    1d27f93
  3. mjog commented on Nov 21, 2025

    @mjog
    ContributorAuthor

    A review for the PR above would be great. If I also produce a backport for 4.x would that be considered for a new release there (I'm stuck on Java 8 for the project I'd like to use JSQLParser for).

  4. mjog commented on Nov 21, 2025

    @mjog
    ContributorAuthor

    Hmm, actually also BY in INCREMENT BY for these statements is also optional, in the same way WITH is. Will update the title and PR.

  5. changed the title [-][BUG] JSQLParser 5.4 PostgreSQL treats the WITH in CREATE SEQUENCE name START WITH … expressions as optional[/-] [+][BUG] JSQLParser 5.4 PostgreSQL treats the WITH and BY in CREATE SEQUENCE expressions as optional[/+] on Nov 21, 2025
  6. added a commit that references this issue on Nov 21, 2025
    d5e7148
  7. mjog commented on Nov 21, 2025

    @mjog
    ContributorAuthor

    Updated to allow for an optional BY in INCREMENT BY.

  8. added a commit that references this issue on Nov 21, 2025
    40ccf4b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions