Skip site navigation (1) Skip section navigation (2)

Re: case sensitivity on table & column names / workaround?

From: Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>
To:
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: case sensitivity on table & column names / workaround?
Date: 2006-06-15 18:52:47
Message-ID: 4491AC7F.4060701@amsoftwaredesign.com (view raw or flat)
Thread:
Lists: pgsql-odbc
postgresql(dot)org(at)tgice(dot)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 


In response to

pgsql-odbc by date

Next:From: zhaoxinDate: 2006-06-16 01:22:38
Subject: Re: Memory Leak ?
Previous:From: postgresql.orgDate: 2006-06-15 18:13:31
Subject: case sensitivity on table & column names / workaround?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group