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 1s30FZ-008IdM-8x for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2024 21:15:25 +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 1s30FW-00CFa3-OS for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2024 21:15:23 +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 1s30FW-00CFZs-E7 for pgsql-general@lists.postgresql.org; Fri, 03 May 2024 21:15:23 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s30FQ-001OzU-5x for pgsql-general@lists.postgresql.org; Fri, 03 May 2024 21:15:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 443LFBhe2746168; Fri, 3 May 2024 17:15:11 -0400 From: Tom Lane To: Adrian Klaver cc: Magnus Hagander , David Gauthier , pgsql-general@lists.postgresql.org Subject: Re: \dt shows table but \d says the table doesn't exist ? In-reply-to: <7c3a1c91-566a-46f7-82b5-b47eac58c500@aklaver.com> References: <7c3a1c91-566a-46f7-82b5-b47eac58c500@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Fri, 03 May 2024 14:08:26 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2746166.1714770911.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 03 May 2024 17:15:11 -0400 Message-ID: <2746167.1714770911@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Adrian Klaver writes: > On 5/3/24 14:06, Magnus Hagander wrote: >> Looks like you might need a \d "some_idIds" (include the quotes) since = >> it has an uppercase characters? > This: > "Did not find any relation named "public.some_idIds"." > to me indicates it did look for the properly cased name. No, that message just regurgitates what you typed. Magnus is correct that the pattern will be case-folded if not quoted. You can check with --echo-hidden (-E): postgres=3D# \d public.some_idIds /******** QUERY *********/ SELECT c.oid, n.nspname, c.relname FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid =3D c.relnamespace WHERE c.relname OPERATOR(pg_catalog.~) '^(some_idids)$' COLLATE pg_catalog= .default AND n.nspname OPERATOR(pg_catalog.~) '^(public)$' COLLATE pg_catalog.def= ault ORDER BY 2, 3; /************************/ Did not find any relation named "public.some_idIds". So it is in fact looking for public.some_idids. regards, tom lane