Re: [HACKERS] Case sensitivity issues

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: charpent(at)bacbuc(dot)dyndns(dot)org
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Case sensitivity issues
Date: 2000-02-07 02:29:27
Message-ID: 10155.949890567@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Emmanuel Charpentier <charpent(at)bacbuc(dot)dyndns(dot)org> writes:
> [ much snipped ]
> This seems to me proof enough that the behaviour of PostgreSQL (or
> ODBC driver) related to case sensitivity is not coherent.
> Could some kind soul shed some light on this ?

It's hard to tell what your driver is doing, but the underlying backend
behavior is simple enough.

A table or field name written in an SQL query is forced to lowercase
*unless* it is written with double-quotes around it:

SELECT * FROM Table; -- refers to "table"

SELECT * FROM "Table"; -- refers to "Table"

Your debugging output shows that the CREATE TABLE statement is being
sent as-is, so the name is lowercased before the CREATE happens.
You didn't show what was being sent for your other queries like
sqlColumns(). I speculate that the driver is translating those into
SQL queries in which the provided name is quoted...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 2000-02-07 03:04:18 DISTINCT and ORDER BY bug?
Previous Message Hannu Krosing 2000-02-07 01:26:00 Re: [HACKERS] An introduction and a plea ...