Thread: BUG #2302: \d command gets double quoted table name in error message - ""table_name""

BUG #2302: \d command gets double quoted table name in error message - ""table_name""

From
"Alexander Pivovarov"
Date:
The following bug has been logged online:

Bug reference:      2302
Logged by:          Alexander Pivovarov
Email address:      apivovarov@gmail.com
PostgreSQL version: 8.1.3
Operating system:   FreeBSD 6.1
Description:        \d command gets double quoted table name in error
message - ""table_name""
Details:

e.g. I have a table "weather".
when I run:
mydb=# \d "weatheR"
Did not find any relation named ""weatheR"".

weatheR is double quoted by "" in error message

Re: BUG #2302: not a bug

From
Reece Hart
Date:
On Mon, 2006-03-06 at 11:03 +0000, Alexander Pivovarov wrote:
> e.g. I have a table "weather".
> when I run:
> mydb=# \d "weatheR"
> Did not find any relation named ""weatheR"".
>
> weatheR is double quoted by "" in error message

This is not a bug.  Quoting always makes identifiers case-sensitive, per
the SQL standard.

Read section 4.1.1:
http://www.postgresql.org/docs/8.1/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

--
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0

Re: BUG #2302: not a bug

From
Stephan Szabo
Date:
On Mon, 6 Mar 2006, Reece Hart wrote:

> On Mon, 2006-03-06 at 11:03 +0000, Alexander Pivovarov wrote:
> > e.g. I have a table "weather".
> > when I run:
> > mydb=# \d "weatheR"
> > Did not find any relation named ""weatheR"".
> >
> > weatheR is double quoted by "" in error message
>
> This is not a bug.  Quoting always makes identifiers case-sensitive, per
> the SQL standard.

I think the problem being reported is the fact that the double quoted
identifier is itself double quoted in the error message, not the fact
that it gave an error in the first place. Presumably the error should be:
 Did not find any relation named "weatheR".