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