pg_dump: query to get data of sequence "blahblahthis" returned name "blahblahthat"

Started by Robert John Shepherdover 23 years ago3 messagesgeneral
Jump to latest
#1Robert John Shepherd
robert@reviewer.co.uk

When trying to do a pg_dumpall I get:

dumping database "Reviewer"...
pg_dump: query to get data of sequence "intartistmemberindex_key"
returned name "tblartistsmembers_intartistmemb"
pg_dump failed on Reviewer, exiting

Having googled around a bit I've discovered this is because I have
renamed a few sequences. Since I had no choice but to do this (either
postgresql or pgadmin II has a 30 character limit for sequence names,
and the ones the migration wizard creates on importing are over 30 chars
and so get chopped off, leaving invalid sequences referenced in the
defaults of various fields, /me breaths out), is there any known fix to
work around this problem?

Don't like not being able to back up a database properly and regularly.
:)

Thanks in advance for any help.

Yours Unwhettedly,
Robert John Shepherd.

Editor
DVD REVIEWER
The UK's BIGGEST Online DVD Magazine
http://www.dvd.reviewer.co.uk

For a copy of my Public PGP key, email: pgp@robertsworld.org.uk

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert John Shepherd (#1)
Re: pg_dump: query to get data of sequence "blahblahthis" returned name "blahblahthat"

"Robert John Shepherd" <robert@reviewer.co.uk> writes:

When trying to do a pg_dumpall I get:
dumping database "Reviewer"...
pg_dump: query to get data of sequence "intartistmemberindex_key"
returned name "tblartistsmembers_intartistmemb"
pg_dump failed on Reviewer, exiting

Having googled around a bit I've discovered this is because I have
renamed a few sequences.

Yup.

is there any known fix to work around this problem?

Sure, remove the test in pg_dump that looks at the sequence_name field
of the sequence. We decided that was a dumb idea and diked it out for
7.3 ...

regards, tom lane

#3Robert John Shepherd
robert@reviewer.co.uk
In reply to: Tom Lane (#2)
Re: pg_dump: query to get data of sequence "blahblahthis" returned name "blahblahthat"

is there any known fix to work around this problem?

Sure, remove the test in pg_dump that looks at the sequence_name field
of the sequence. We decided that was a dumb idea and diked it out for
7.3 ...

Thanks!

/me goes to rummage in the source

Yours Unwhettedly,
Robert John Shepherd.

Editor
DVD REVIEWER
The UK's BIGGEST Online DVD Magazine
http://www.dvd.reviewer.co.uk

For a copy of my Public PGP key, email: pgp@robertsworld.org.uk