Re: BUG #2512: pg_dump produces unrestorable output when table and serial sequence are not in the same schema
В списке pgsql-bugs по дате отправления:
| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера