X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2D3479FA13E for ; Thu, 15 Jun 2006 15:52:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 35388-09 for ; Thu, 15 Jun 2006 15:52:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from securetrans.mitrust.com (securetrans.mitrust.com [207.250.112.34]) by postgresql.org (Postfix) with ESMTP id D34849FA5BE for ; Thu, 15 Jun 2006 15:52:32 -0300 (ADT) Received: from [10.201.170.131] (tr2925.mi.micorp.com [10.201.170.131]) by securetrans.mitrust.com (Postfix) with ESMTP id B53517D80B7 for ; Thu, 15 Jun 2006 13:52:30 -0500 (CDT) Message-ID: <4491AC7F.4060701@amsoftwaredesign.com> Date: Thu, 15 Jun 2006 13:52:47 -0500 From: Tony Caduto User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 Cc: pgsql-odbc@postgresql.org Subject: Re: case sensitivity on table & column names / workaround? References: <4491A34B.3040704@tgice.com> In-Reply-To: <4491A34B.3040704@tgice.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/117 X-Sequence-Number: 7865 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