X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 59BD3D1B1D2 for ; Mon, 28 Jun 2004 17:14:16 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93461-09 for ; Mon, 28 Jun 2004 20:14:17 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 13EC9D1B1A1 for ; Mon, 28 Jun 2004 17:14:14 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i5SKEDQC081821 for ; Mon, 28 Jun 2004 20:14:13 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i5SJt4ov077438 for pgsql-admin@postgresql.org; Mon, 28 Jun 2004 19:55:04 GMT From: tfo@alumni.brown.edu (Thomas F. O'Connell) X-Newsgroups: comp.databases.postgresql.admin Subject: Re: pg_restore usage Date: 28 Jun 2004 12:55:05 -0700 Organization: http://groups.google.com Lines: 14 Message-ID: <80c38bb1.0406281155.470ef80b@posting.google.com> References: <80c38bb1.0406211357.f9fadd6@posting.google.com> <11767.1088346148@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/12 X-Sequence-Number: 14080 So these two statements seem to be somewhat contradictory. What's the point of -C if not to create the database named in -d? And why does -C -d template1 work but not -C -d ? -tfo tgl@sss.pgh.pa.us (Tom Lane) wrote in message news:<11767.1088346148@sss.pgh.pa.us>... > Whatever database you name in -d has to already exist, because that's > where pg_restore will initially connect. -C means to issue a CREATE > DATABASE command and then reconnect to the new db. > > In other words, try "-C -d template1".