Re: case sensitivity on table & column names / workaround? - Mailing list pgsql-odbc

From Tony Caduto
Subject Re: case sensitivity on table & column names / workaround?
Date
Msg-id 4491AC7F.4060701@amsoftwaredesign.com
Whole thread Raw
In response to case sensitivity on table & column names / workaround?  (postgresql.org@tgice.com)
List pgsql-odbc
postgresql.org@tgice.com wrote:
>
> The problem that causes me in my SQL on the PG side is that while I have
> written it with the same capitalization, for readability, I don't put
> double quotes on the identifiers, you know, because it's a pain in the
> ass.

Postgresql forces all sql to lower case unless you quote it (at creation
time).  Quoting forces the capitalization, and then you have to refer to
it forever with quotes.

The long term solution would be to change the MS SQL side of things to
use all lower case.

It's really a good idea on any db system to just use lower case for
everything.  Unless you are using Firebird or Interbase, then it works
just the opposite of PG, it forces everything to
uppercase.

It must be the odbc driver doing the quoting because if you do the
following in PG:

create table MyTestDB(
varchar(10) without oids;

postgresql creates it as mytestdb

if you do:

create table "MyTestDB"(
varchar(10) without oids;

Then the capitals stay and you must always reference the table like so:

select * from "MyTestDB"


--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration


pgsql-odbc by date:

Previous
From: postgresql.org@tgice.com
Date:
Subject: case sensitivity on table & column names / workaround?
Next
From: zhaoxin
Date:
Subject: Re: Memory Leak ?