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

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <yanghui328(at)gmail(dot)com>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6252: After drop the default database 'postgres', I can not create a database by 'createdb.exe'
Date: 2011-10-12 16:28:06
Message-ID: 4E9579C60200002500041EB9@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

<yanghui328(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2011-10-12 16:39:28 Re: [BUGS] *.sql contrib files contain unresolvable MODULE_PATHNAME
Previous Message Kevin Grittner 2011-10-12 16:19:15 Re: BUG #6246: character encoding for 64 bit