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 dialect should allow DEFAULT keyword in place of column values #287

Closed
kevincianfarini opened this issue Aug 31, 2021 · 0 comments · Fixed by cashapp/sqldelight#3373
Labels

Comments

@kevincianfarini
Copy link
Contributor

Dialect

PostgreSQL

Failing SQL

CREATE TABLE foo(bar INTEGER NOT NULL DEFAULT 1);

insert:
INSERT INTO foo(bar)
VALUES(DEFAULT);

Description

The build fails with the following error.

'{' expected, got ':'

within the IDE, the error is displayed on the colon of the named query.

image

AlecKazakova pushed a commit to cashapp/sqldelight that referenced this issue Jul 15, 2022
)

* PostgreSQL: Support using DEFAULT for generated columns in INSERT AlecKazakova/sql-psi#287

* PostgreSQL: Use more predefined token

Co-authored-by: hfhbd <hfhbd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant