Skip to content

PostgreSQL doesn't support manually creating sequences.  #296

Open
@kevincianfarini

Description

@kevincianfarini

Dialect

PostgreSQL

Failing SQL

CREATE SEQUENCE serial START 101;

Description

Sequences are used for a lot of things in PostgreSQL. They're the underlying mechanism by which SERIAL/BIGSERIAL increment keys and they can be used to generate identity columns with GENERATED columns. We should support creating sequences like specified in the documentation.

CREATE [ TEMPORARY | TEMP ] SEQUENCE [ IF NOT EXISTS ] name
    [ AS data_type ]
    [ INCREMENT [ BY ] increment ]
    [ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
    [ START [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
    [ OWNED BY { table_name.column_name | NONE } ]

Until we support sequences, the full grammar of generated columns as in #295 will be incomplete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions