Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3D6D11337B93 for ; Thu, 5 May 2011 11:34:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 55718-04 for ; Thu, 5 May 2011 14:34:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 187241337A5D for ; Thu, 5 May 2011 11:34:39 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p45EYbd7003224; Thu, 5 May 2011 10:34:37 -0400 (EDT) To: "gab" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6007: pg_restore -C -d does not behave as expected when dump is done with pg_dump In-reply-to: <201105051335.p45DZUIe006513@wwwmaster.postgresql.org> References: <201105051335.p45DZUIe006513@wwwmaster.postgresql.org> Comments: In-reply-to "gab" message dated "Thu, 05 May 2011 13:35:30 +0000" Date: Thu, 05 May 2011 10:34:36 -0400 Message-ID: <3223.1304606076@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/23 X-Sequence-Number: 30162 "gab" writes: > Try to restore it using : > pg_restore -C -d test /tmp/plop > pg_restore: [archiver (db)] connection to database "test" failed: FATAL: > database "test" does not exist > But the doc says that -C use the parameter of -d to CREATE the database ... Well, if the docs say that they shouldn't. When you use -C, the database named by -d is just the one where pg_restore initially connects to issue the CREATE DATABASE command. Please specify where you think the documentation is telling you something else. regards, tom lane