On Wed, Sep 27, 2017 at 6:23 AM, Fabrízio de Royes Mello
<fabriziomello@gmail.com> wrote:
> Seems a good plan... but I don't agree with RESET SEQUENCE... maybe just
> CREATE SEQUENCE IF NOT EXISTS when provide IF NOT EXISTS on ALTER TABLE ADD
> COLUMN is enough...
Anything like that is not completely hole-proof either. Let's not
forget that the sequence used with a default expression is not tracked
with its name, so if the sequence created after the serial definition
is renamed, and an INE is used on the given column, then you would
still create a sequence. Even worse, we need to be careful about not
linking the newly-created sequence instead of the one currently used.
In my opinion, the current behavior is more predictible. I think that
we should just document that IFE can leave behind sequences, and live
with that.
--
Michael
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs