Bug with rename bigserial column

Поиск
Список
Период
Сортировка
От D. Dante Lorenso
Тема Bug with rename bigserial column
Дата
Msg-id 40006F30.9050203@lorenso.com
обсуждение исходный текст
Ответы Re: Bug with rename bigserial column  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
I just ran into a dump/restore problem with a bigserial column
on a renamed table.

BIGSERIAL columns when created will automagically create
the sequence also.  The sequence name is derived from
the table name and column name.

I had a table named 'audio_usage' and defined a column like this:

    ausage_id BIGSERIAL

who's default value was

    NEXTVAL('public.audio_usage_ausage_id_seq')

I then renamed my table to 'audio_file_usage'.  But the column
in the table remained unchanged. (that ok?)

Well, then I did a pg_dump and a pg_restore to migrate my dev
environment to qa.  Well, sure enough, the dump was fine,
but when the restore happened, the newly renamed table combined
with the same bigserial column automagically created it's
sequence, but the sequence created is different from the
default NEXTVAL which still refers to the original table_column_seq
name.

I've corrected the problem manually, but it does seem like a bug
somewhere.

Dante



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: postgresql dies without saying why
Следующее
От: "Cornelia Boenigk"
Дата:
Сообщение: Problem with date calculations