Re: JDBC bug?
| От | Barry Lind |
|---|---|
| Тема | Re: JDBC bug? |
| Дата | |
| Msg-id | 3C028DBA.8060605@xythos.com обсуждение исходный текст |
| Ответ на | JDBC bug? (Nate Gelbard <gelbardn@tripwire.com>) |
| Список | 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 >
В списке pgsql-jdbc по дате отправления: