Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

Use proper specific type for 'id' #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Use proper specific type for 'id' #9

wants to merge 1 commit into from

Conversation

aPinat
Copy link

@aPinat aPinat commented Oct 18, 2020

IDENTITY is supposed to be used since its introduction in Postgres 10 anyways..
Also the bot never generates the ID itself, so let Postgres just do it always.
Fixes the weird NotNullConstraintViolationException people have.

@aPinat
Copy link
Author

aPinat commented Oct 18, 2020

Only works, if you don't connect back to the same session... Because the ALWAYS doesn't allow Postgres to overwrite.
Alt would have been `PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, but apparently it results in the same exception.
So, just leave it open for now I guess...

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

Successfully merging this pull request may close these issues.

1 participant