On Fri, Apr 26, 2019 at 11:55:34AM -0400, Alvaro Herrera wrote: > On 2019-Apr-26, Laurenz Albe wrote: > I think a better overall fix is that that when creating the generated > column (or altering a column to make it generated) we should look for > existing an existing sequence and take ownership of that (update > pg_depend records), before deciding to create a new sequence.
What that be actually right? The current value of the sequence would be the one from the previous use, and max/min values may not be the defaults associated with identity columns, which is ranged in [-2^31,2^31-1] by default, but the sequence you may attempt (or not) to attach to could have completely different properties. It seems to me that it is much better to start afresh and not enforce the sequence into something that the user may perhaps not want to use. My 2c. -- Michael
signature.asc
Description: PGP signature