From: Tony Caduto <tony_caduto@amsoftwaredesign.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: case sensitivity on table & column names / workaround?
Date: Thu, 15 Jun 2006 13:52:47 -0500
Message-ID: <4491AC7F.4060701@amsoftwaredesign.com> (raw)
In-Reply-To: <4491A34B.3040704@tgice.com>
References: <4491A34B.3040704@tgice.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: tony_caduto@amsoftwaredesign.com
Subject: Re: case sensitivity on table & column names / workaround?
In-Reply-To: <4491AC7F.4060701@amsoftwaredesign.com>
References: <4491A34B.3040704@tgice.com> <4491AC7F.4060701@amsoftwaredesign.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox