Re: [bug?] oddity creating table with uppercase initial - Mailing list pgsql-novice

From Jeff Eckermann
Subject Re: [bug?] oddity creating table with uppercase initial
Date
Msg-id 20030608184151.27602.qmail@web20807.mail.yahoo.com
Whole thread Raw
In response to [bug?] oddity creating table with uppercase initial  (Paul Makepeace <postgresql.org@paulm.com>)
List pgsql-novice
SQL is case insensitive, except for the actual data.
Most commercial databases deal with this by forcing
everything to upper case (the SQL standard appears to
support this approach); PostgreSQL forces everything
to lower case.  This was a choice made long ago, and
nobody is in a hurry to change it.  Either way, you
will have a problem.

The answer is to double quote your mixed case
identifiers: select * from "Banks";

The name must have been quoted when the table was
created; if you are unaware of that, you must have
used some administration/migration tool that quoted
the names without your knowing.

Since you must remember to quote the names every time
you use them, mixed case names are a trap waiting to
spring.  My experience is that they are more trouble
than they are worth.

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

pgsql-novice by date:

Previous
From: Joanne Formoso
Date:
Subject: Strange Encryption Bug
Next
From: Bruno Wolff III
Date:
Subject: Re: [bug?] oddity creating table with uppercase initial