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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, David Gauthier <dfgpostgres(at)gmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <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-04 04:14:23
Message-ID: 2816866.1714796063@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Friday, May 3, 2024, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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.

And? If they access the DB exclusively through their client language,
then yeah maybe they'll never know the difference. But if they are
also using psql or other direct-SQL-access tools, they will learn
the quoting rules PDQ. There's still no reason that \d should be
inconsistent with SQL.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-05-04 04:22:55 Re: \dt shows table but \d <table> says the table doesn't exist ?
Previous Message David G. Johnston 2024-05-04 04:06:20 Re: \dt shows table but \d <table> says the table doesn't exist ?