Re: dump and sequence initilizing

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Markus Rebbert <markus(dot)rebbert(at)freenet(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dump and sequence initilizing
Date: 2003-12-15 12:22:16
Message-ID: 20031215122216.GB19153@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Dec 15, 2003 at 13:19:48 +0100,
Markus Rebbert <markus(dot)rebbert(at)freenet(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Johnson, Shaunn 2003-12-15 14:31:47 PostgreSQL on Windows Server 2003
Previous Message Markus Rebbert 2003-12-15 12:19:48 dump and sequence initilizing