Thread: pgDump sequence dump bug

pgDump sequence dump bug

From
"Primoz"
Date:
I think there is a bug in pgDump..

If I try to dump database with sequences which have "Uppercase" names it
dumps it like this:
CREATE SEQUENCE "Uppercase";
CREATE TABLE "Table" (
  "ID" int4 not null default nextval('Uppercase':something),
);

And it do not work until I manualy change it to

CREATE SEQUENCE "Uppercase";
CREATE TABLE "Table" (
  "ID" int4 not null default nextval('"Uppercase"':something),
);

If it is not a bug please tell me how to make pgdump working in a way that
restoration of database will be possible without manual changes to backup.

Primo¾

Re: pgDump sequence dump bug

From
Tom Lane
Date:
"Primoz" <primoz@slo-tech.com> writes:
> If I try to dump database with sequences which have "Uppercase" names it
> dumps it like this:
> CREATE SEQUENCE "Uppercase";
> CREATE TABLE "Table" (
>   "ID" int4 not null default nextval('Uppercase':something),
> );

This is fixed in 7.1.  I don't think there's any simple fix possible
in earlier versions.  I suggest you avoid mixed-case sequence names
for the moment...

            regards, tom lane