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

Reply via email to