Skip site navigation (1) Skip section navigation (2)

Re: Restoring sequence values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bendik Rognlien Johansen <bendik(dot)johansen(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Restoring sequence values
Date: 2005-11-17 17:58:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Bendik Rognlien Johansen <bendik(dot)johansen(at)gmail(dot)com> writes:
> Is there any way to restore the value of sequences when using  
> pg_restore on a custom format (pg_dump -c) dump file?

It should happen automatically.

> Also is there an easy way to copy a database from one machine to  
> another?
> I have tried using pg_dump/pg_restore, but this does not work well  
> because the order of the objects get mixed up (Lots of foreign keys  
> etc.)

This should work properly if using 8.0 or later pg_dump; older versions
were a few bricks shy of a load :-(.  If it *is* 8.0, please post
details to pgsql-bugs.

			regards, tom lane

In response to

pgsql-novice by date

Next:From: operationsengineer1Date: 2005-11-17 19:06:17
Subject: Re: Application using PostgreSQL (off topic, but relevant to question)
Previous:From: Bendik Rognlien JohansenDate: 2005-11-17 17:40:15
Subject: Restoring sequence values

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group