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 1s36vY-009XFo-8I for pgsql-general@arkaria.postgresql.org; Sat, 04 May 2024 04:23:12 +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 1s36vV-00F1H3-Lz for pgsql-general@arkaria.postgresql.org; Sat, 04 May 2024 04:23:10 +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 1s36vT-00F1Gu-R5 for pgsql-general@lists.postgresql.org; Sat, 04 May 2024 04:23:10 +0000 Received: from fout1-smtp.messagingengine.com ([103.168.172.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s36vL-001Rtm-Sa for pgsql-general@lists.postgresql.org; Sat, 04 May 2024 04:23:07 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 6D1A51380356; Sat, 4 May 2024 00:22:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 04 May 2024 00:22:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1714796577; x=1714882977; bh=kbhfU2ZSS4C6bzMZrSljR+XR63PXj6UML14KcK7WBJo=; b= K9F6O+tD5QrQovZ0YLmnrYjJnRkDxYgLjkFCRioy7NflvTEN0BXxFcNI3maUQ7yX aIkVQMm9MLUxJGt0GyDEtUZeQGFZdlOvIO1L9F7dWkVqy13BaQu4b70tGXRLfAb6 vFXnMXUnq4fQOHk36osK+d/K0LSS/mj88lE/jMiO4ihoSjkFrRHsoMbBEG4c61LT 8d7QIjIjibeCA52Go32vjdQcy/+2BqxkkFZ8vU2G3oCPW0VIGguLfX8qMbLgrMB6 q8t/Re+UKaQcvOvF0bilwhI4wTPQtgtNv0AiqmZMNKpJ9pMHe6tq1c2JuTuW2Ty6 PiTEn67BO08XiM0OOzvgpg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714796577; x= 1714882977; bh=kbhfU2ZSS4C6bzMZrSljR+XR63PXj6UML14KcK7WBJo=; b=k nsC0oxaAvgWEWggdmAlD6tZy+su66MG7Txc9V4CdGo0FPboflG+nqmyXWPuh1aBK osEFbGDGMxQrWXzDYqPfrGFU5P/IcZ7BDEl7L2j4XOUAdBwXKqYdOAjaB3pxbqOe 7jEhVdLOuGe1NSH8O4KTFE73/yvavoQ2lvpCRbXsIA5F38oIaV9CL1bRhLN9j9He 2PS9MA2G0cpI3l5+ftzCgnhK16Foy95QZwFvRk6DKcp/IQbBze4BjAue8szGnSmD OWyLevv5mV2LSDkW+JHyMk2DzF7X86NclRY2++GI6mZCD3U0I02F7IisbXWOVi4M f91tMuTbW8Kuuu4YoQHXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvuddgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepgfdufeekhfevfeelveeiueevhedvuddukeduvddv lefhueeuieejtdeuvdevvdeunecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrgh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughr ihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 4 May 2024 00:22:56 -0400 (EDT) Message-ID: <8a888f00-3752-463e-87c6-bb3979c7a4b8@aklaver.com> Date: Fri, 3 May 2024 21:22:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: \dt shows table but \d says the table doesn't exist ? To: "David G. Johnston" , Tom Lane Cc: jian he , Magnus Hagander , David Gauthier , "pgsql-general@lists.postgresql.org" References: <7c3a1c91-566a-46f7-82b5-b47eac58c500@aklaver.com> <2746167.1714770911@sss.pgh.pa.us> <2808875.1714794677@sss.pgh.pa.us> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/3/24 21:06, David G. Johnston wrote: > On Friday, May 3, 2024, Tom Lane > wrote: > > > By and large, I'd expect people using mixed-case table names to get > accustomed pretty quickly to the fact that they have to double-quote > those names in SQL.  I don't see why it's a surprise that that is also > true in \d commands. > > > Every day the number of people increases who get mixed-case names in > their DB because their client language preserves case and doesn’t > require quoting. In a sense they do by making quoting the default, which people find out when they stray from the language/ORM/framework and get pointed at: https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS > > And it isn’t like any sane person is using case to distinguish names in > their DB and so would be at risk of seeing multiple unwanted matches for > any given pattern. Have you met people? > > I don’t think name pattern matching during object lookup is a good tool > to wield to try and convince people that using camel case is a bad idea > and they should use snake case instead.  If they don’t write enough raw > SQL to be annoyed by their choice more power to them, making \d more > accessible for them is a win and snake case people won’t notice or care. > > David J. -- Adrian Klaver adrian.klaver@aklaver.com