Re: Bug in Dependencies Code in 7.3.x?
От | Tom Lane |
---|---|
Тема | Re: Bug in Dependencies Code in 7.3.x? |
Дата | |
Msg-id | 24682.1041287964@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Bug in Dependencies Code in 7.3.x? (Tara Piorkowski <tara@vilaj.com>) |
Ответы |
Re: Bug in Dependencies Code in 7.3.x?
|
Список | pgsql-hackers |
Tara Piorkowski <tara@vilaj.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
В списке pgsql-hackers по дате отправления: