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?
Nate Gelbard wrote:
> I've found an annoyance with the postgresql JDBC driver (from the 7.1.3
> 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
> 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?
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
In response to
- JDBC bug? at 2001-11-26 18:00:32 from Nate Gelbard
pgsql-jdbc by date
|Next:||From: Colin Freas||Date: 2001-11-26 19:10:52|
|Subject: Re: JDBC bug?|
|Previous:||From: Stuart Robinson||Date: 2001-11-26 18:40:52|
|Subject: Re: CallableStatements|