Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4qja-008Aow-NS for pgsql-general@arkaria.postgresql.org; Wed, 16 Apr 2025 00:34:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u4qjY-002LcA-5B for pgsql-general@arkaria.postgresql.org; Wed, 16 Apr 2025 00:34:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4qjX-002La8-Nz for pgsql-general@lists.postgresql.org; Wed, 16 Apr 2025 00:34:32 +0000 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u4qjV-000Inj-1p for pgsql-general@lists.postgresql.org; Wed, 16 Apr 2025 00:34:32 +0000 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-2c7f876b320so3977802fac.1 for ; Tue, 15 Apr 2025 17:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744763668; x=1745368468; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=eYu9vabQFnwkg4GITG4QJIOdVS7mbt2sEWwBh1Jdvak=; b=GG3LPsJBydjfEK41EgzhEAfc0fpZ5RAOhb2O93wf0h5Z8I6CfAZMYB0HrVvPzPqsNK 169KvVphU/PzsqLtG7C5DRWngQVn22ho5pDj2vgy19KkG/AcStKxWKttcqye9GL9fWsF PgdD63XuJuMaHNyKBsW7MPVhAgKZhhoQB3N2znnJY2DHjesdmHFVfuiYdRMGiEobo22J rrG/DQxrOr+vhB0VpD3O7HaW2SgZSZKxzZmUbLFYq6Fl0oKK/nSkWqHJe2Dfx0Cb+xuy z9NwNMW5Z++2wrv6hRwgvAghArEczu9r6cfoIUNeajxdm8GComkmp3urojIGM3OOXtr1 El2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744763668; x=1745368468; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eYu9vabQFnwkg4GITG4QJIOdVS7mbt2sEWwBh1Jdvak=; b=Rn3HELjKb/0zcwYJkFpn1qzvGKERN3V65Obe9Rae3rvVNKsPSSzEJzp1/8IUop/0Sp 8TYETPJJXkmB3mBM6Di+xINY+jMEAln50Xf10czoEb89WPFnAd+qDyWKCbjdvXTLL6xq ev0MG2AsqDQZ/f39lk/6WmRiuXr5LVoZ3f5CfjGrMGynY9hmqnQGbjw/wOm2dj2TyqMJ nwpHpp1kNsgBquova+BOq6URPM0wZJQolCPa9FjsF/7Klc7Li0Xjg1hRNKHiEsPWKeua 8loc+SAxiNAWeNWuaJbLcMWYGwH/oAsCC+RK9WDizcLB6skVfllfSa1TJdE9aqxt34Cy wzAw== X-Forwarded-Encrypted: i=1; AJvYcCXxa2sSgD4NNfr/O8E/LfhBdYlJTU00sg49qX0Wf85EARWVqx30ThS3eIh3PQDNzCO4BMp2Q7zH9I1ZIX78@lists.postgresql.org X-Gm-Message-State: AOJu0YwwFcCbi9KXs1OAFePM4e5ajG7HvlteljBsI4jl0Eloe5vTp+Wh NioLyVETQccJgZQme6c3Cf4lkmQgrpJ0czOWv5wx7xkJAthrd7CQjR0if9ULrUN+PnGt2hPpn9o n0SFICjuvm8Ylg+CzlujK5G5GZfg= X-Gm-Gg: ASbGncuHzjRo6hvWUP+Ahs21xh8Q2VNsrw6/sDedhTKJltmEp1a/4YLb60qoJUkvEla OI0h4bIVeRXS6A7zXAW/UpCvgtJe4aHYUDHsQ/fzArTT2WI9itfUpfSRmOBagsMzXgEetlu4g1D zd8ThVxSiAKy8iX9JbCVhU X-Google-Smtp-Source: AGHT+IENKg2Fc9kFee22khFrJ/nr2DYMGNCmkVZ/JmoTYH059IXFPp9Crr5Jg1PUfjeOcpsbzXyFnIdBVNcHQvncUfw= X-Received: by 2002:a05:6870:2384:b0:2c2:5a63:9cd4 with SMTP id 586e51a60fabf-2d4c3c6e28cmr721832fac.19.1744763668575; Tue, 15 Apr 2025 17:34:28 -0700 (PDT) MIME-Version: 1.0 References: <817abeac-d628-4279-bfef-9e1e3aa1884b@aklaver.com> <25b6cd49-f871-47fe-bf3b-5416637736ca@aklaver.com> In-Reply-To: From: "David G. Johnston" Date: Tue, 15 Apr 2025 17:33:51 -0700 X-Gm-Features: ATxdqUGRPikGD4sjKwX2nrRk2iXmVvZWpmvlWXI1LOJ6F5bitIR670JLyWONSPc Message-ID: Subject: Re: Fwd: Identify system databases To: Adrian Klaver Cc: Igor Korot , "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000aebd510632da725b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000aebd510632da725b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 15, 2025 at 5:24=E2=80=AFPM Adrian Klaver wrote: > > > > By creating the initial three databases the system is more usable due t= o > > 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. --000000000000aebd510632da725b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Apr 15, 2025 at 5:24=E2=80=AFPM Adrian Klaver <= adrian.klaver@aklaver.com&= gt; wrote:
>
> By creating the initial three databases the system is more usable due = to
> having established conventions.=C2=A0 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=C2=A0pg_database column to identify the system/conventional databases creat= ed by initdb.=C2=A0 They are identified by name.=C2=A0 You must know fr= om documentation=C2=A0or experience that they are "postgres", &qu= ot;template1" and "template0".

Pick whicheve= r of "system" or "convention" or some other word makes = you happy to categorize those three databases.=C2=A0 Though I suggest &= quot;the initdb" databases since neither of the other terms is used an= ywhere in the documentation.

David J.

--000000000000aebd510632da725b--