Search Postgresql Archives

Re: "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Milen Kulev" <makulev@xxxxxxx> writes:
> My case : I have a DB, that I  have archived with
> pg_dump -C -Fc  -d   testdb1 > tdb1b.bak
> Then I am dropping the database testdb1 ( with DROP DATABASE testdb1; ) I want to recover it. When I issue the following
> command:
> pg_restore  -C -Fc tdb1b.bak
> I am getting all the SQL statements executed, but the DB testdb1 is NOT created, although 
> I have explicitely specified it (-C option).

Works AFAICS --- I see this in pg_restore's output:

	CREATE DATABASE testdb1 WITH TEMPLATE = template0 ENCODING = 'UTF8';

	ALTER DATABASE testdb1 OWNER TO postgres;

	\connect testdb1

Are you not getting those commands?  Maybe they are failing for some
reason?

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux