Skip to content

Failed to handle RESTART in ALTER SEQUENCE #1405

@arcuri82

Description

@arcuri82

Hi,
RESTART does not seem to be supported. For example:

ALTER SEQUENCE SYSTEM_SEQUENCE_40560F88_80C4_4F3B_BDAA_D18CC8D5C5AA RESTART WITH 1

CCJSqlParserUtil.parse(sql) fails with

Encountered unexpected token: "RESTART" <S_IDENTIFIER>
    at line 1, column 69.

Was expecting one of:

    ";"
    "CACHE"
    "CYCLE"
    "GLOBAL"
    "INCREMENT"
    "KEEP"
    "MAXVALUE"
    "MINVALUE"
    "NOCACHE"
    "NOCYCLE"
    "NOKEEP"
    "NOMAXVALUE"
    "NOMINVALUE"
    "NOORDER"
    "ORDER"
    "SESSION"
    "START"

however, RESTART is a valid option, at least for H2 and Postgres

Using JSqlParser 4.2

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