Re: \d failing to find uppercased object names

From: Craig Ringer <craig(at)2ndQuadrant(dot)com>
To: Виктор Егоров <vyegorov(at)gmail(dot)com>
Cc: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: \d failing to find uppercased object names
Date: 2013-01-25 01:06:19
Message-ID: 5101DA8B.6040402@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/24/2013 08:51 PM, Виктор Егоров wrote:
> 2013/1/24 Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>:
>> some app created tables ussing uppercase letters in table names (this app
>> was migrated from mysql). One tries to use \d to search tables info:
>>
>> ...
>>
>> Could this be considered as gotcha?
>>
>> The thing is that Postgres reply is pretty much clear:
>> > Did not find any relation named "pnct_Board".
>> , but table "pnct_Board" does exist in the system, so Postgres' reply is
>> obviously incorrect.
> Take a look at this section in the docs:
> http://www.postgresql.org/docs/current/interactive/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
>
> This is expected behavior.
Yep. You could propose a patch for a case-insensitive modifier for \d,
though I don't know how well it'd be received.

(Or is there a way to do that using psql's wildcards already? In this
simple case \d pnct_* would work, but not in the general case where you
might be looking for TaBLeNAMe)

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2013-01-25 01:09:37 Re: Clarification of certain SQLSTATE class
Previous Message Craig Ringer 2013-01-25 00:55:17 Re: Strange Windows problem, lock_timeout test request