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

PostgreSQL doesn't support manually creating sequences. #296

Open
kevincianfarini opened this issue Sep 27, 2021 · 0 comments
Open

PostgreSQL doesn't support manually creating sequences. #296

kevincianfarini opened this issue Sep 27, 2021 · 0 comments
Labels

Comments

@kevincianfarini
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant