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

Started by Alexander Pivovarovabout 20 years ago3 messagesbugs
Jump to latest
#1Alexander Pivovarov
apivovarov@gmail.com

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

#2Reece Hart
reece@harts.net
In reply to: Alexander Pivovarov (#1)
Re: BUG #2302: not a bug

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

#3Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Reece Hart (#2)
Re: BUG #2302: not a bug

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".