Search Postgresql Archives

Re: Fwd: Identify system databases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 15, 2025 at 3:11 PM Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
"David G. Johnston" <david.g.johnston@xxxxxxxxx> writes:
> On Tue, Apr 15, 2025 at 11:20 AM Adrian Klaver <adrian.klaver@xxxxxxxxxxx>
> 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!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux