pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Barry Lind <barry@xythos.com>
To: Nate Gelbard <gelbardn@tripwire.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC bug?
Date: Mon, 26 Nov 2001 10:45:14 -0800
Message-ID: <3C028DBA.8060605@xythos.com> (raw)
References: <3C028340.2010003@tripwire.com>

Nate,

In general it seems that doing the toLowerCase is the correct behavior. 
  SQL is case insensitive, and in postgres this is acheived by 
lowercasing all names (tablenames, columnnames, functionnames, etc).  So 
in general there is no difference between  createdBy, createdby, 
CreatedBy, CREATEDBY from a SQL perspective.  However SQL also allows 
mixed case identifiers if they are quoted.  Thus "createdBy" will only 
match "createdBy" and will not match createdBy without quotes (because 
the latter if folded to lower case).

I am not sure exactly what your problem is.  Can you provide some more 
details given the explanation presented above?

thanks,
--Barry


Nate Gelbard wrote:

> Hi,
> 
> I've found an annoyance with the postgresql JDBC driver (from the 7.1.3 
> release).
> 
> Pardon if this has been asked before, but the web archives are offline...
> 
> In org/postgresql/jdbc2/DatabaseMetaData.java, there are several lines
> that call toLowerCase() on the table string names. This causes 'table 
> unknown' erros when accessing tables with mixed case in the name. This 
> popped out at me when trying to use the XML-DBMS package and also 
> DbVisualizer.
> 
> Also, when using the pgsql shell, \d createdBy returns table unknown, 
> but \d "createBy" returns the right info.
> 
> So does postgres not support mixed case in table names, or the backend 
> does but the clients dont, or what?
> 
> nate
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html
> 





view thread (23+ messages)  latest in thread

Message-ID: <3C028DBA.8060605@xythos.com>
Permalink:  ../3C028DBA.8060605@xythos.com/
Also on:    postgresql.org/message-id/3C028DBA.8060605@xythos.com

 · 

reply

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-jdbc@postgresql.org
  Cc: barry@xythos.com, gelbardn@tripwire.com
  Subject: Re: JDBC bug?
  In-Reply-To: <3C028DBA.8060605@xythos.com>
  References: <3C028340.2010003@tripwire.com> <3C028DBA.8060605@xythos.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