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 1s315D-008RQe-9e for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2024 22:08:47 +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 1s3158-00CYJR-BL for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2024 22:08:43 +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 1s3157-00CYJH-UD for pgsql-general@lists.postgresql.org; Fri, 03 May 2024 22:08:42 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s3156-001PKQ-9f for pgsql-general@lists.postgresql.org; Fri, 03 May 2024 22:08:42 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2a2da57ab3aso143113a91.3 for ; Fri, 03 May 2024 15:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714774118; x=1715378918; 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=S+Y2Q+Ah2QH/BOZmZ7vSDMnNxjeuaEDgbpmUXimR3JE=; b=Btgoavocw4bLFcd1C1RE1NzpAgyGq0gxJ068uKv3ObMEtEb8nburBF/Ejw+9ozWWB3 9+yVhV9d03chVv7jyRqOz3PYK4PcpaTvqrXU0+qyYjRrswpGEo4kmNzR6WWnl1cpozHH eqehQ/jg+iCSXFrETXsvTnMuek7vUqhKiQvdHiIoYzeOcqsFWIbwuco8KREmu9wN083b lHUQOne4VE7LkktGn/TisaAN/daQ3xXc0ldjFduAJD4EPZ8VsawCEWp8xbYOJPSTwNXj fcvpUBtB/8oN89NMx4S+DXsitcoodRIYIC9Yct35Y8kQ/WJXGuLJOcdRuT1JqX1rBJKi 96bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714774118; x=1715378918; 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=S+Y2Q+Ah2QH/BOZmZ7vSDMnNxjeuaEDgbpmUXimR3JE=; b=c2W+/5WPEzO9891WI1ZXaKzmqj3OnZ3kGP4ZWtJVqYMV8KElI6oLH0NQg/8j9XNx+n IRA/KHPV16M442TYXiZp7GlW3SlmNuF3v/hUionxdUmkhZiiv58br+JFq43M/vkHbFrV iAyZRL5pJFK/DZP22PRb3HjCNY6l13acEMalnca3GnnpRfpCYWxZX7LQifd8ijDBWb3Q Uk0kEMAX3q5ncuRsJNoAUHr6RjtElFWm9OyiWaNqS9qoFs4F/a0KPz2KcxG1WGma76Bp xRYl2DbfUB4ZX2Cx4aYYRfO8kjkV+wPMDVkWZPbEiPn8oB2QZZxxQl6T/MeUn8XNUMLq 8DDw== X-Forwarded-Encrypted: i=1; AJvYcCVxTOjkBXsVVGKjZ6F4PqQBZfUA63IkAspYxVrVqZFJnTlcNHMciwa32fZss0eMtWi5zx3xhmuVXQmJSGLTZy+8rFD52ozodAGtKfIgIBgIdKZA X-Gm-Message-State: AOJu0Yw5Rt+mR6a+9kErgoC2vwc1yW20vR0qyOvgENUcYd7oxpC5HMQz YZrBoPHemRUXS2EmDeq9VOVQH5HqO10irJcsQlPKDoz5dvrO4DurWCm2mSrkIjyFT3rVBxm5HrQ F/rvzbh7Q58hitdIlUht6yhKAWtg= X-Google-Smtp-Source: AGHT+IEnb1BHxnQxrJ40+GfVY9UZ7vglzkGwle+iqAnq6kEkl+qwLTS/fqP4hGGbGNiwETs70tvxWZXB+BP8r5LlQpk= X-Received: by 2002:a17:90b:3552:b0:2b2:926b:35e1 with SMTP id lt18-20020a17090b355200b002b2926b35e1mr3932016pjb.13.1714774118130; Fri, 03 May 2024 15:08:38 -0700 (PDT) MIME-Version: 1.0 References: <7c3a1c91-566a-46f7-82b5-b47eac58c500@aklaver.com> <2747922.1714771700@sss.pgh.pa.us> In-Reply-To: <2747922.1714771700@sss.pgh.pa.us> From: Isaac Morland Date: Fri, 3 May 2024 18:08:25 -0400 Message-ID: Subject: Re: \dt shows table but \d says the table doesn't exist ? To: Tom Lane Cc: Magnus Hagander , Adrian Klaver , David Gauthier , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000002e6f50061793f632" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002e6f50061793f632 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 3 May 2024 at 17:28, Tom Lane wrote: This is one of the places where it's unfortunate that our English-text > rule for quoting a string to set it off from the rest of the error > message collides with SQL's rule for quoting an identifier. Leaving > out the outer quotes would be contrary to our style guide, but having > them there can be confusing too to people who know SQL well. I'm not sure if this is a serious suggestion or not: enclose the name of the table, as you would type it in psql, between curly quotes. So for example: =E2=80=9Ctable_name=E2=80=9D =E2=80=9C"TableNameWithUpperCaseLetters"=E2=80=9D In a context where the curly quotes and surrounding message could be in a non-monospaced typeface and the table name (including double quote marks if needed) in a monospaced typeface this would be more natural. --0000000000002e6f50061793f632 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, 3 May 2024 at 17:28, Tom Lane <= ;tgl@sss.pgh.pa.us> wrote:
<= /div>

This is one of the places where it's unfortunate that our English-text<= br> rule for quoting a string to set it off from the rest of the error
message collides with SQL's rule for quoting an identifier.=C2=A0 Leavi= ng
out the outer quotes would be contrary to our style guide, but having
them there can be confusing too to people who know SQL well.

I'm not sure if this is a serious suggestion or not: = enclose the name of the table, as you would type it in psql, between curly = quotes.

So for example:

= =E2=80=9Ctable_name=E2=80=9D
=E2=80=9C"TableNameWithUpperCas= eLetters"=E2=80=9D

In a context where the cur= ly quotes and surrounding message could be in a non-monospaced typeface and= the table name (including double quote marks if needed) in a monospaced ty= peface this would be more natural.

--0000000000002e6f50061793f632--