Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 43624B5DC0A for ; Wed, 12 Oct 2011 23:55:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 99350-06 for ; Thu, 13 Oct 2011 02:55:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-gy0-f174.google.com (mail-gy0-f174.google.com [209.85.160.174]) by mail.postgresql.org (Postfix) with ESMTP id 39868B5DBDB for ; Wed, 12 Oct 2011 23:55:13 -0300 (ADT) Received: by gyb13 with SMTP id 13so1340758gyb.19 for ; Wed, 12 Oct 2011 19:55:13 -0700 (PDT) Received: by 10.236.182.233 with SMTP id o69mr2259672yhm.60.1318474513403; Wed, 12 Oct 2011 19:55:13 -0700 (PDT) Received: from ayaki.localdomain ([202.81.69.135]) by mx.google.com with ESMTPS id 18sm11914622any.21.2011.10.12.19.55.10 (version=SSLv3 cipher=OTHER); Wed, 12 Oct 2011 19:55:12 -0700 (PDT) Message-ID: <4E96530B.7060507@ringerc.id.au> Date: Thu, 13 Oct 2011 10:55:07 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0 MIME-Version: 1.0 To: "Can not create DB by 'createdb.exe' when DB 'postgres' is droped" CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6252: After drop the default database 'postgres', I can not create a database by 'createdb.exe' References: <201110120648.p9C6mfGf002304@wwwmaster.postgresql.org> In-Reply-To: <201110120648.p9C6mfGf002304@wwwmaster.postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/106 X-Sequence-Number: 31376 On 10/12/2011 02:48 PM, Can not create DB by 'createdb.exe' when DB 'postgres' is droped wrote: > > The following bug has been logged online: > > Bug reference: 6252 > Logged by: Can not create DB by 'createdb.exe' when DB 'postgres' > is droped > Email address: yanghui328@gmail.com > PostgreSQL version: 9.0.5 > Operating system: Windows XP SP2 > Description: After drop the default database 'postgres', I can not > create a database by 'createdb.exe' > Details: > > 1.drop database 'postgres' > 2.create a database by createdb.exe > the follow error message will dispaly: > Can not create DB by 'createdb.exe' when database 'postgres' is droped Yep. You need to use a `CREATE DATABASE' command from psql to re-create the `postgres' database after connecting to the "template1" database, eg: template1=> CREATE DATABASE postgres WITH OWNER postgres; -- Craig Ringer