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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

have pg_restore create a new database?


  • From: "Thomas H." <me(at)alternize(dot)com>
  • To: <pgsql-general(at)postgresql(dot)org>
  • Subject: have pg_restore create a new database?
  • Date: Sun, 26 Nov 2006 14:18:32 +0100
  • Message-id: <08ec01c7115d$5fb8dd50$0201a8c0(at)iwing>

i'm trying to have pg_restore create a new db and load the data.
 
unfortunately, pg_restore always uses the database name specified in the dump. "--create" and "--dbname=newdb" does not seem to have any effect (pg_restore yells about database being non-existant).
 
what is the proper method to restore data from a previous named database "olddb" into a fresh database named "newdb"? the old database still exists and i don't want to overwrite the data.
 
regards,
thomas 


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group