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

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

From
"Robert John Shepherd"
Date:
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


"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

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

From
"Robert John Shepherd"
Date:
> > 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