Re: Proposal: Better generation of values in GENERATED columns.

2019-08-26 Thread Tom Lane
Peter Eisentraut writes: > On 2019-08-26 13:28, Daniel Migowski wrote: >> I would like to implement a fallback solution >> that detects such errors and automatically updates the nextvalue of the >> sequence when the nextvalue is already used on insert. > ISTM that such a system would likely hav

Re: Proposal: Better generation of values in GENERATED columns.

2019-08-26 Thread Peter Eisentraut
On 2019-08-26 13:28, Daniel Migowski wrote: > I would like to implement a fallback solution > that detects such errors and automatically updates the nextvalue of the > sequence when the nextvalue is already used on insert. ISTM that such a system would likely have many of the same problems as th

Proposal: Better generation of values in GENERATED columns.

2019-08-26 Thread Daniel Migowski
Hello, one of the most frustating things when I started with PostgreSQL was that IDENTITY columns are based on sequences that are completly disconnected from the table contents and manually imported data will lead to errors like 'duplicate key value violates unique constraint "xyz_pkey"'. I