By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,691 Members | 2,041 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,691 IT Pros & Developers. It's quick & easy.

dump and sequence initilizing

P: n/a
Hi list,

what happens with sequences if i dump a database and i want to reload
it?

Do i have to initialize the sequences like
SELECT setval('sequence', max(id)) FROM table;
?

Best regards,
Markus
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Mon, Dec 15, 2003 at 13:19:48 +0100,
Markus Rebbert <ma************@freenet.de> wrote:
Hi list,

what happens with sequences if i dump a database and i want to reload
it?

Do i have to initialize the sequences like
SELECT setval('sequence', max(id)) FROM table;
?


Sequence values should be part of the dump.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #2

P: n/a
Dear Markus Rebbert ,
what happens with sequences if i dump a database and i want to reload
it?

The pg_dump command also dumps the index value of sequences and you do
not have to do any thing
Just make sure your pg_restore and pg_dump with option --disable-tiggers

Regards,
Vishal kashyap

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #3

P: n/a
Am Mon, den 15.12.2003 schrieb Sai Hertz And Control Systems um 16:26:
Dear Markus Rebbert ,
what happens with sequences if i dump a database and i want to reload
it?

The pg_dump command also dumps the index value of sequences and you do
not have to do any thing
Just make sure your pg_restore and pg_dump with option --disable-tiggers


Okay, thanks.

Markus
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.