Skip to content

Updating generated-always is false-positive #445

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

Open
avocado-enthusiast opened this issue Mar 25, 2025 · 0 comments
Open

Updating generated-always is false-positive #445

avocado-enthusiast opened this issue Mar 25, 2025 · 0 comments

Comments

@avocado-enthusiast
Copy link

Describe the bug

Postgres will throw an error if an update tries to change a generated always identity column, pg-mem will not throw. Tests will pass in dev but code will fail once deployed.

To Reproduce

create table test (id integer generated always as identity, value text);
insert into test (value) values ('test');
update test set id=1 where id=1;
ERROR:  column "id" can only be updated to DEFAULT
DETAIL:  Column "id" is an identity column defined as GENERATED ALWAYS.

pg-mem version

version 3.0.4

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

No branches or pull requests

1 participant