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

Re: JDBC bug?

From: Barry Lind <barry(at)xythos(dot)com>
To: Nate Gelbard <gelbardn(at)tripwire(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC bug?
Date: 2001-11-26 18:45:14
Message-ID: 3C028DBA.8060605@xythos.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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
> 



In response to

  • JDBC bug? at 2001-11-26 18:00:32 from Nate Gelbard

pgsql-jdbc by date

Next:From: Colin FreasDate: 2001-11-26 19:10:52
Subject: Re: JDBC bug?
Previous:From: Stuart RobinsonDate: 2001-11-26 18:40:52
Subject: Re: CallableStatements

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