PG 8.1, dump/restore not consistent for sequence names

Поиск
Список
Период
Сортировка
От Parks, Aaron B.
Тема PG 8.1, dump/restore not consistent for sequence names
Дата
Msg-id 24F6514DFA6FD544BCA10A5C9A47E76103BCF22A@rtpwexc06.RCC_NT.RTI.ORG
обсуждение исходный текст
Ответы Re: PG 8.1, dump/restore not consistent for sequence names  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-admin по дате отправления:

Предыдущее
От: DM
Дата:
Сообщение: What is the standard configuration settings?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PG 8.1, dump/restore not consistent for sequence names