public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Fwd: Identify system databases
Date: Tue, 15 Apr 2025 17:17:57 -0400
Message-ID: <CANzqJaA=cVJz7NKdAVMKXMnKYvmeD_+AHvc0c+mQDwCa-tM7tg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CA+FnnTxab=JyE0DZkfL4Z2MK8RvvTud9MZiNenD45AoV_t2Mxg@mail.gmail.com>
	<CAKFQuwYaDXuuDoEaad5sYW97pRS_FJnmfZCwY3FojnDOdfXc9Q@mail.gmail.com>
	<CA+FnnTzwmMTNymgPuiF4CLfa6YO+HBRx4Qy5_B_KDw1oNpiukw@mail.gmail.com>
	<CA+FnnTyWMXPEVAwNNDnCVDfmTFNHdDfffiF5vLioxyTv8Jmq0A@mail.gmail.com>
	<[email protected]>
	<CAKFQuwbkQTbUwA4c6LFOMUWX5ojQY8DpKPQRh+xoe4VZABPWfw@mail.gmail.com>
	<[email protected]>
	<CAKFQuwYpY7urAHuns26cw=9TKTZJU4JdVBrXWoSH_nHfZ_s3Ww@mail.gmail.com>
	<[email protected]>

On Tue, Apr 15, 2025 at 3:11 PM Tom Lane <[email protected]> wrote:

> "David G. Johnston" <[email protected]> writes:
> > On Tue, Apr 15, 2025 at 11:20 AM Adrian Klaver <
> [email protected]>
> > wrote:
> >> If what you say is true why does initdb lack an option to not create
> >> them on creating a cluster?
>
> > By creating the initial three databases the system is more usable due to
> > having established conventions.  They are conventional databases, not
> > system ones.
>
> Precisely.  For example, the only reason for the "postgres" database
> to exist is so that there is a reasonable default database for clients
> to connect to.  If we didn't have it we'd need some other convention.
> (Indeed, we used to not have it, and back then the default client
> behavior was usually to connect to template1.  That led to people
> creating random junk in template1 and then being surprised when
> CREATE DATABASE copied it into new databases.)
>

Interesting history.  I've always interpreted the "postgres" database as
being the system database, but now I know it's not.

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Fwd: Identify system databases
  In-Reply-To: <CANzqJaA=cVJz7NKdAVMKXMnKYvmeD_+AHvc0c+mQDwCa-tM7tg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox