From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Tara Piorkowski <tara(at)vilaj(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Bug in Dependencies Code in 7.3.x? |
Date: | 2002-12-30 22:39:24 |
Message-ID: | 24682.1041287964@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tara Piorkowski <tara(at)vilaj(dot)com> writes:
> junk=> create table testing
> junk-> (testing_id serial not null primary key);
> NOTICE: CREATE TABLE will create implicit sequence
> 'testing_testing_id_seq' for SERIAL column 'testing.testing_id'
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
> 'testing_pkey' for table 'testing'
> CREATE TABLE
> junk=> alter table testing
> junk-> alter column testing_id drop default;
> ALTER TABLE
I'd be inclined to say that the bug here is that you shouldn't be
allowed to do ALTER COLUMN DROP DEFAULT (nor SET DEFAULT for that
matter) on a SERIAL column. The default expression is part of the
implementation of SERIAL, not an independently tweakable entity.
We could make it work sort of the way Tara is expecting if the
dependency link were to associate the sequence object with the
column's default expression, and not with the column itself ---
but if we did that, then the above DROP DEFAULT would probably make
the sequence object go away too, which is still not quite what
she's expecting.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tara Piorkowski | 2002-12-31 01:08:51 | Re: Bug in Dependencies Code in 7.3.x? |
Previous Message | Neil Conway | 2002-12-30 21:31:45 | Re: why was libpq.so's version number bumped? |