Hello.

I am working with PostgreSQL 7.1.2.

Earlier I worked with PostgreSQL 6.5.3 and I had no problems.

How to make, that at pg_dump were taken into account sequence. In a file dump.txt it is always created sequnece with initial value 1.

Example:

I have table:

Users (id serial primary key, ….).

And sequence users_id_seq.

I make: /usr/local/pg-7/bin/pg_dump -u -f /usr/home/andrey/pg/dump.txt db_name

In file dump.txt creat string:

CREATE SEQUENCE "users_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1š cache 1 ;

Though should be CREATE SEQUENCE "users_id_seq" start 787 increment 1 maxvalue 2147483647 minvalue 1š cache 1 ;

As users_id_seq. last_value = 787.

 

The version 6.5.3 worked correctly.

 

Best regards, Popov Andrey.

 

  • ... Попов Андрей

Reply via email to