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 Takahiro | Date: 2005-02-03 10:25:55 |
| Subject: Re: [PATCHES] WAL: O_DIRECT and multipage-writer (+ memory leak) |
| Previous: | From: Oleg Bartunov | Date: 2005-02-03 09:34:48 |
| Subject: Re: Crash when inserting gist records, or creating index |