Re: BUG #2512: pg_dump produces unrestorable output when table and serial sequence are not in the same schema

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2512: pg_dump produces unrestorable output when table and serial sequence are not in the same schema
Дата
Msg-id 26258.1152044265@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #2512: pg_dump produces unrestorable output when table and serial sequence are not in the same schema  ("Phil Frost" <indigo@bitglue.com>)
Список pgsql-bugs
"Phil Frost" <indigo@bitglue.com> writes:
> Creating the database:

> test=> create schema private;
> test=> create table o(i serial primary key);
> test=> alter sequence o_i_seq set schema private;

I would argue that the bug is we allow you to do the above ;-).
It's not really sane to move a serial sequence out of its owning table's
schema (compare the situation for indexes).  If you play with it you'll
find that "alter table o set schema private" will move the sequence too
... but the above case isn't checked for.

This ties into the long-running discussion on whether a serial column
should be entirely a black box or not.  Currently there are quite a few
things you could do to the underlying sequence object that pg_dump would
fail to dump/restore correctly.  One school of thought says we'd be best
off to forbid any direct manipulation of the sequence object.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "tommaso gastaldi"
Дата:
Сообщение: BUG #2513: What? OleDbSchemaGuids not supported ?!!! This is CRUCIAL!
Следующее
От: Tomasz Ostrowski
Дата:
Сообщение: Re: query very slow when enable_seqscan=on