PG 8.1, dump/restore not consistent for sequence names

From: "Parks, Aaron B(dot)" <aparks(at)rti(dot)org>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: PG 8.1, dump/restore not consistent for sequence names
Date: 2009-04-07 20:03:06
Message-ID: 24F6514DFA6FD544BCA10A5C9A47E76103BCF22A@rtpwexc06.RCC_NT.RTI.ORG
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I have PG SQL 8.1 running on a RHEL 4 system (64 bit).

I have numerous tables, all of which were created with

CREATE TABLE someTable (myID SERIAL, someField varchar . . .etc

Postgres created numerous sequences for me and it all seemed to work
great. Elsewhere I have lots of java code that gets the values of the
sequences out like:

"SELECT last_value FROM
simulation_probability_of_occ_simulation_probability_of_occ_seq"

Which also seems to work great.

Now I did a dump/restore to send it to a client and I have the following
problem:

In the first DB (the one that works) I have this in the table def for
the table (from PGAdmin III):

simulation_probability_of_occurence_id integer NOT NULL DEFAULT
nextval('simulation_probability_of_occ_simulation_probability_of_oc_seq4
'::regclass),

And in the restored DB I have this:

simulation_probability_of_occurence_id integer NOT NULL DEFAULT
nextval('simulation_probability_of_occ_simulation_probability_of_oc_seq3
'::regclass),

This is wreaking all kinds of havoc with my Java code. I've tried
exporting with and without OIDs (from PGADMIN III) with no apparent
change.

Is there something I can do to keep those sequences in the right places?

Thanks

Aaron Parks

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2009-04-07 20:58:23 Re: PG 8.1, dump/restore not consistent for sequence names
Previous Message DM 2009-04-07 17:25:19 What is the standard configuration settings?