Skip site navigation (1) Skip section navigation (2)

Re: pg_dump bug in 7.3.9 with sequences

From: Dawid Kuroczko <qnex42(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump bug in 7.3.9 with sequences
Date: 2005-02-03 09:53:41
Message-ID: 758d5e7f050203015316cdabb7@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, 2 Feb 2005 19:04:04 -0300, Alvaro Herrera
<alvherre(at)dcc(dot)uchile(dot)cl> 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

In response to

pgsql-hackers by date

Next:From: ITAGAKI TakahiroDate: 2005-02-03 10:25:55
Subject: Re: [PATCHES] WAL: O_DIRECT and multipage-writer (+ memory leak)
Previous:From: Oleg BartunovDate: 2005-02-03 09:34:48
Subject: Re: Crash when inserting gist records, or creating index

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group