Re: BUG #6252: After drop the default database 'postgres', I can not create a database by 'createdb.exe' - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #6252: After drop the default database 'postgres', I can not create a database by 'createdb.exe'
Date
Msg-id 4E9579C60200002500041EB9@gw.wicourts.gov
Whole thread Raw
In response to BUG #6252: After drop the default database 'postgres', I can not create a database by 'createdb.exe'  ("Can not create DB by 'createdb.exe' when DB 'postgres' is droped" <yanghui328@gmail.com>)
Responses Re: BUG #6252: After drop the default database 'postgres', I can not create a database by 'createdb.exe'  (John R Pierce <pierce@hogranch.com>)
List pgsql-bugs
<yanghui328@gmail.com> wrote:

> 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

To create a database, the createdb executable has to connect to the
cluster.  A connection is always to some specific database.  The
postgres database was added specifically so that such utilities
could make a connection somewhere so they could do their work.  If
you drop it, you break those applications.

This is not a bug.  The workaround is to not drop the database which
is automatically created on installation.

-Kevin

pgsql-bugs by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: BUG #6246: character encoding for 64 bit
Next
From: John R Pierce
Date:
Subject: Re: BUG #6252: After drop the default database 'postgres', I can not create a database by 'createdb.exe'