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

Re: [JDBC] BUG: DatabaseMetaData.getColumns isn't case insensitive

From: maly(dot)velky(at)email(dot)cz
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] BUG: DatabaseMetaData.getColumns isn't case insensitive
Date: 2009-02-03 10:23:10
Message-ID: 1619.2522-20386-1582424767-1233656590@email.cz (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hello, thank you very much for your clarification.

So there is no way how to perform case-insensitive search in getColumns() ?

> > supportsMixedCaseIdentifiers: false
> This is reporting how the server matches up with the SQL standard, not how 
> a particular JDBC API call works.
So when does this (namely "Retrieves whether this database treats mixed case unquoted SQL identifiers as case sensitive" = false) apply? As you say it doesn't apply to the getColumns call but when does it? For insert/update/select statements only? If it applies for select statements, what happens (referring to you example) when I've "select t1 from ...", does it select t1, T1, or fail?

> ------------ Původní zpráva ------------
> Od: Kris Jurka <books(at)ejurka(dot)com>
> Předmět: Re: [JDBC] BUG: DatabaseMetaData.getColumns isn't case insensitive
> Datum: 03.2.2009 05:49:23
> ----------------------------------------
> 
> 
> On Mon, 2 Feb 2009, maly(dot)velky(at)email(dot)cz wrote:
> 
> > I'was trying to get meta data of a column and discovered that the column 
> > name is case sensitive though it should be case insensitive. I don't 
> > know if this can be somehow determined by a configuration or environment 
> > change because I believe that till recently it worked in a 
> > case-insensitive manner.
> 
> This is done by design and has been since 7.3 I believe.  The problem is 
> that you can legally have two columns named "T1" and "t1".  To support 
> this we need to be case sensitive on the Java side.
> 
> > BTW, the metadata reports:
> > supportsMixedCaseIdentifiers: false
> > supportsMixedCaseQuotedIdentifiers: true
> > (which is pretty much expected)
> 
> This is reporting how the server matches up with the SQL standard, not how 
> a particular JDBC API call works.
> 
> Kris Jurka
> 
> 
> 

Jakub Holy
maly(dot)velky(at)email(dot)cz

In response to

Responses

pgsql-jdbc by date

Next:From: Andrew LazarusDate: 2009-02-03 21:53:36
Subject: getHost()
Previous:From: Kris JurkaDate: 2009-02-03 04:43:40
Subject: Re: BUG: DatabaseMetaData.getColumns isn't case insensitive

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