Thread: dump and sequence initilizing
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
On Mon, Dec 15, 2003 at 13:19:48 +0100, Markus Rebbert <markus.rebbert@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.
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
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