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

Does not work with identity columns in Postgres #199

Open
kaushalyap opened this issue Sep 17, 2024 · 0 comments
Open

Does not work with identity columns in Postgres #199

kaushalyap opened this issue Sep 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kaushalyap
Copy link

Bug report

Describe the bug

If you have identity column in a table you will get error like

error: relation "app_public.app_public.demo_id_seq" does not exist

To Reproduce

Create a table like below

CREATE TABLE IF NOT EXISTS app_public.demo
(
    id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
   name TEXT NOT NULL
 );

Follow instructions given here, there with npx tsx seed.ts you will get an error.

Expected behavior

Support identity columns in Postgres even though there is not visible sequence created by Postgres with identity columns unlike serial columns. (identity sequences are manged internally by Postgres)

System information

  • OS: Linux fedora 6.10.7-200.fc40.x86_64
  • Version of Node.js: v20.11.1

Additional context

https://www.postgresql.org/docs/17/ddl-identity-columns.html

@kaushalyap kaushalyap added the bug Something isn't working label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant