have pg_restore create a new database? - Mailing list pgsql-general

From Thomas H.
Subject have pg_restore create a new database?
Date
Msg-id 08ec01c7115d$5fb8dd50$0201a8c0@iwing
Whole thread Raw
Responses Re: have pg_restore create a new database?
List pgsql-general
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 

pgsql-general by date:

Previous
From: Ragnar
Date:
Subject: Re: PGDATA
Next
From: Tom Lane
Date:
Subject: Re: have pg_restore create a new database?