Re: \dt shows table but \d <table> says the table doesn't exist ?

From: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, David Gauthier <dfgpostgres(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: \dt shows table but \d <table> says the table doesn't exist ?
Date: 2024-05-03 22:08:25
Message-ID: CAMsGm5c8LG4vQ9SY4J5Hjco9XEqJUGcNtK+sR=TGFDGHnv5cTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 3 May 2024 at 17:28, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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:

“table_name”
“"TableNameWithUpperCaseLetters"”

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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message AJ ONeal 2024-05-03 22:57:19 How to Build Postgres in a Portable / Relocatable fashion?
Previous Message Tom Lane 2024-05-03 21:28:20 Re: \dt shows table but \d <table> says the table doesn't exist ?