"Milen Kulev" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to