Re: BUG #2764: Capital letter in tables or columns not

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: Ron Teitelbaum <ron(at)usmedrec(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2764: Capital letter in tables or columns not
Date: 2006-11-21 15:38:37
Message-ID: 200611211538.kALFcbZ02486@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jaime Casanova wrote:
> On 11/17/06, Ron Teitelbaum <ron(at)usmedrec(dot)com> wrote:
> >
> > The following bug has been logged online:
> >
> > Bug reference: 2764
> > Logged by: Ron Teitelbaum
> > Email address: ron(at)usmedrec(dot)com
> > PostgreSQL version: 1.4.1
> > Operating system: Windows
> > Description: Capital letter in tables or columns not supported
> > Details:
> >
> > I ran into a very weird problem that tured out to be a capital letter in the
> > table name or column name. When trying to query a table with a capital
> > letter in the name I get error relation not defined.
> >
> > I can get it to work with something like:
> > select * from "zipCodes"
> >
> > It appears to be completely case insensitive if the table is all lowercase.
> >
> >
>
> that's not a bug... if you create a table or column with capital
> letters postgres transform it to lowercase...
>
> if you don't want that you need to double quotes...
>
> create table "Foo" (Col1 int);
> select * from "Foo";

I added a mention of "capitalization" in the FAQ item on this:

<H3 id="item4.21">4.21) Why are my table and column names not
recognized in my query? Why is capitalization not preserved?</H3>

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-11-21 15:53:51 Re: Postgresql out-of-memory error
Previous Message Sule, Olufemi (IITA) 2006-11-21 13:14:49 PGSQL SETUP PROBLEM