On Wed, 2 Feb 2005 19:04:04 -0300, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > It is not pilot error if PostgreSQL allows it. There is > > nothing "illegal" about the above commands in their execution. > > The pg_dump application should recognize that the object has > > changed and react accordingly. > > ISTM this is a bug, but it's not clear to me what is the solution. > I can think of two: > > 1. Changing the default is forbidden > 2. When the default is changed, the dependency on the sequence is > dropped, and the sequence itself is dropped.
In my humble opinion, the command: ALTER TABLE ALTER COLUMN fooser SET DEFAULT nextval('aaa_seq'); should be equivalent to: ALTER TABLE ALTER COLUMN fooser TYPE integer; ALTER TABLE ALTER COLUMN fooser SET DEFAULT nextval('aaa_seq'); ...ie, if we mess with 'default' it is no longer a serial, but a plain integer with default sequence. Regards, Dawid ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq