Re: BUG #5308: How to disable Case sensitivity on naming identifiers

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Kelly SACAULT <kelly(dot)sacault(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5308: How to disable Case sensitivity on naming identifiers
Date: 2010-02-03 03:27:37
Message-ID: 162867791002021927k1974472ev473fe3c8b5303908@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

usually sql identifiers are case insensitive. There are exception. If
you use double quotes for sql identifier, then you have to write exact
same identifier everywhere.

postgres=# create table Foo(a integer);
CREATE TABLE
Time: 174,078 ms
postgres=# select * from Foo;
a
---
(0 rows)

Time: 33,255 ms
postgres=# select * from foo;
a
---
(0 rows)

Time: 0,822 ms
postgres=# drop table foo;
DROP TABLE
Time: 34,945 ms
postgres=# create table "Foo"(a integer);
CREATE TABLE
Time: 3,225 ms
postgres=# select * from foo;
ERROR: relation "foo" does not exist
LINE 1: select * from foo;
^
postgres=# select * from Foo;
ERROR: relation "foo" does not exist
LINE 1: select * from Foo;
^
postgres=# select * from "Foo";
a
---
(0 rows)

Time: 1,277 ms

you cannot change this behave. Just don't use double quotes in create
statement.

Regards
Pavel Stehule

2010/2/2 Kelly SACAULT <kelly(dot)sacault(at)gmail(dot)com>:
>
> The following bug has been logged online:
>
> Bug reference:      5308
> Logged by:          Kelly SACAULT
> Email address:      kelly(dot)sacault(at)gmail(dot)com
> PostgreSQL version: 8.4.2
> Operating system:   Ubuntu 9.10
> Description:        How to disable Case sensitivity on naming identifiers
> Details:
>
> I have installed Postgresql using Ubuntu Synaptic.
>
> In the contrary of what is stated in the official manual, I have to write
> case sensitive SQL statements in my postgresql connexion.
>
> What parameter do I have to change in the postgresaql configuration ? I have
> spent many hours in studying the parameters, the faqs and the forums. I have
> found nothing to make my SQL statements case-insensitive.
> I want to be able to execute successfully such stmts:
>
> SELECT col1 FROM myTABLE
>
> SELECT Col1 FROM myTable
>
> please, may you help ?
>
> Kelly
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jasen Betts 2010-02-03 05:53:37 Re: whole-row functional index?
Previous Message Chris Travers 2010-02-03 03:21:13 Re: BUG #5308: How to disable Case sensitivity on naming identifiers