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 1u4xq6-00A87j-2Z for pgsql-general@arkaria.postgresql.org; Wed, 16 Apr 2025 08:09:46 +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 1u4xq3-009OCe-EW for pgsql-general@arkaria.postgresql.org; Wed, 16 Apr 2025 08:09:44 +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 1u4xq3-009OCT-2V for pgsql-general@lists.postgresql.org; Wed, 16 Apr 2025 08:09:43 +0000 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u4xq0-000MMd-25 for pgsql-general@lists.postgresql.org; Wed, 16 Apr 2025 08:09:43 +0000 Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3fec2899574so4346913b6e.2 for ; Wed, 16 Apr 2025 01:09:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744790980; x=1745395780; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=naxZOQuylKxWsFNdWnMWXtbcMQ8kNMYf+9jXgcyYuFU=; b=A3EnNsGzHFvhY8YN/+AkiTRf6iZQ8IeTvrpvADWig0zZPb33q79ickiGusMxgeQLwV ZiJuJ2Hj1BEEciLHpfUQh9SiwPoaZhfEB3alpOwyf1OjhH6PZTQ04hOVCwzA1G1dwQVs 6x0kG299fDln/udOl5fyjRGS3amVktnceAVJ2rpGQ/PP6eadOzr2zzX8gnDCLshSYODK DUCz7xbAjr6izzQYN6dQkhEDzzXFcFqTtsmNaN6cnbnpPwYIV6lAiQ+mWHY+aXwXup4B uJrVWLlKF0m0pTmFAMeJM5vX0Oq/cx93VA5IBYN4+fRaa9ZvyqdhVmibNboJSm8vaU1H gd2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744790980; x=1745395780; h=content-transfer-encoding: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=naxZOQuylKxWsFNdWnMWXtbcMQ8kNMYf+9jXgcyYuFU=; b=lmurkD+OI7LlejlN7O7yzCGS8dJp8cZfscDt7PJD7BiROQ3m6mdJzqtD2PFEwSxQKm sbtSWRuGshqTn00U/a80X/NtGsc6DGWTUaJm2PHkw7M5LhJyP+wMcsIfQGLtj1QOZzoJ dZkC+4CvyPuBLqVwBd+3ydqz0KgDpzWEvO5BH+gIqJW/Qhk3BC54VhVRg1UC3NYqoGOs XNL23TmRZDjjEfsM1fv6gfxX70zogUFi3vT/+dFx+ifGs6BDLDzdWk4vSmIpsE7MDX1X oBEni+WXiMqSgpTUds9mry4cSpOGXm67CDNI8k06pMoFGxsKtSJn3nRkn8LJUVnoIGYa 5FAw== X-Forwarded-Encrypted: i=1; AJvYcCU7XlZSEtugIvzatPABZdfPWF2qyK5lQYR1al7skm9dxXnji+4XzVYQlBJw9r+dErk8jI/Uth+xLp2jvsWv@lists.postgresql.org X-Gm-Message-State: AOJu0YyliQx6oEs3j3ynwDOQt4juhurTntQGLZNS5TDiXLgsJ7yPiipa u5+ZTRrnLyb91YkHJ3LlKYVPql1QW78TiKBE2XZOGdeOG4ylOsyl6NLd7JliS5qhjnssc6grpEF J2QJuYet2z7wchoZ5nfFLGwPzSmQ= X-Gm-Gg: ASbGnctt8Dx3UzrsAmb7RexADEwK35cjLfl9Dps7kEqYgNJPt3H4ZrpgkVCBKy9hvsz P8BdCfQO1C3y5q8pzWsAFbp1POqGdd3RieTQsQXynzLW6nYU5BVDappzztsgX9o61+Qo7QSu5a0 73MaAzlq9BrulJZ/fUDdKTqLNA X-Google-Smtp-Source: AGHT+IFqCpefBH+Ozkx4GYlmI+x/55Y/GtjW5UOzm35zEZvFPS54FJzvcIDOFiwccxPAcXl6UyPsITvdRR5q2irN2EI= X-Received: by 2002:a05:6808:13c4:b0:3fb:49cd:6bf5 with SMTP id 5614622812f47-400b023195emr442795b6e.32.1744790979732; Wed, 16 Apr 2025 01:09:39 -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: Dominique Devienne Date: Wed, 16 Apr 2025 10:09:11 +0200 X-Gm-Features: ATxdqUGtNKrN1AiUPMUZkb6YEsHvnel75q7Lxojv0b0u_HuKO_5LDNnnM_0dD54 Message-ID: Subject: Re: Fwd: Identify system databases To: Laurenz Albe Cc: Adrian Klaver , "David G. Johnston" , Igor Korot , "pgsql-generallists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Apr 16, 2025 at 9:32=E2=80=AFAM Laurenz Albe wrote: > On Tue, 2025-04-15 at 17:24 -0700, Adrian Klaver wrote: > But then you fortunately cannot drop all databases, because you cannot > drop the database you are connected to. > > Still, a cluster that is missing "postgres" will give beginners trouble Right. Given shared "cluster-wide" objects like roles, databases, etc... I'm always found it weird that one must know "a priori" the name of one database to connect to, to do anything with PostgreSQL. Not being able to drop the DB one's connected to is also a pita. If one have the right to do it, then it should just be done, and the connection closed. Authentication is cluster-wide, not DB specific, so I'd welcome a way to co= nnect to the cluster, not a specific DB, and introspect shared-objects, including databases I'm allowed to connect to, which could be an empty list. FWIW. And a little OT. And implicit cluster-level mini-DB given access just to a subset of catalogs, or at least some limited queries like my databases and my roles, nothing else, would be very welcome IMHO. --DD