From: Dawid Kuroczko <qnex42@gmail.com>
To: Alvaro Herrera <alvherre@dcc.uchile.cl>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pg_dump bug in 7.3.9 with sequences
Date: Thu, 3 Feb 2005 10:53:41 +0100
Message-ID: <758d5e7f050203015316cdabb7@mail.gmail.com> (raw)
In-Reply-To: <20050202220404.GC1967@dcc.uchile.cl>
References: <42013187.7040806@commandprompt.com>
<6686.1107379308@sss.pgh.pa.us>
<42014C28.1070300@commandprompt.com>
<20050202220404.GC1967@dcc.uchile.cl>
On Wed, 2 Feb 2005 19:04:04 -0300, Alvaro Herrera
<alvherre@dcc.uchile.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: qnex42@gmail.com, alvherre@dcc.uchile.cl
Subject: Re: pg_dump bug in 7.3.9 with sequences
In-Reply-To: <758d5e7f050203015316cdabb7@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox