Re: Fwd: Identify system databases - Mailing list pgsql-general

From David G. Johnston
Subject Re: Fwd: Identify system databases
Date
Msg-id CAKFQuwZ1_WSfJOTd8kMjfCDEm_55LoLkBNJcm4GjYoc2EPTd0A@mail.gmail.com
Whole thread Raw
In response to Re: Fwd: Identify system databases  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
On Tue, Apr 15, 2025 at 5:24 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>
> By creating the initial three databases the system is more usable due to
> having established conventions.  They are conventional databases, not
> system ones.

The bottom line is the Postgres project has built an infrastructure
around those names that the community is plugged into.


So, the answer is no, there is no dedicated pg_database column to identify the system/conventional databases created by initdb.  They are identified by name.  You must know from documentation or experience that they are "postgres", "template1" and "template0".

Pick whichever of "system" or "convention" or some other word makes you happy to categorize those three databases.  Though I suggest "the initdb" databases since neither of the other terms is used anywhere in the documentation.

David J.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Fwd: Identify system databases
Next
From: vijay patil
Date:
Subject: Re: Best Tool for PostgreSQL Auditing and Storing Audit Logs Separately