Apparently there is a database "postgres" that is created by default on each postgresql server installation. Can anyone tell me or point me to documentation what it is used for?
It appears that it does not really have a well-defined purpose. According to the docs:
(Source: http://www.postgresql.org/docs/8.2/interactive/app-initdb.html ) |
|||||
|
When a client application connects to a Postgres server, it must specify which database that it wants to connect to. If you don't know the name of a database (within the cluster serviced by the postmaster to which you connect), you can find a list of database names with the command:
When you run that command, psql connects to the server and queries pg_database for a list of database names. However, since psql is a Postgres client application, it can't connect to the server without knowing the name of at least one database: Catch-22. So, psql is hard-coded to connect to a database named "postgres" when you run "psql -l".
|
|||||
|
There is also the database template0, your safety net when you screw up all others.
|
|||
|