From: David Johnston <polobo@yahoo.com>
To: 'dmp' <danap@ttc-cmc.net>
To: 'Laurent Mazuel' <lmazuel@antidot.net>
To: 'PostgreSQL JDBC' <pgsql-jdbc@postgresql.org>
Subject: Re: Case-sensitive problem in AS clause?
Date: Mon, 16 Jul 2012 12:49:05 -0400
Message-ID: <014801cd6372$e9d20850$bd7618f0$@yahoo.com> (raw)
In-Reply-To: <50043BC9.2090401@ttc-cmc.net>
References: <5004221A.4030508@antidot.net>
<50043BC9.2090401@ttc-cmc.net>
> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-
> owner@postgresql.org] On Behalf Of dmp
> Sent: Monday, July 16, 2012 12:05 PM
> To: Laurent Mazuel; PostgreSQL JDBC
> Subject: Re: [JDBC] Case-sensitive problem in AS clause?
>
> Again as the as identifier is not quoting it default to the default
behavior for
> assignment. As far as the isCaseSensitive() it is found that the method in
the
> Pgjdbc, org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java is:
>
> /*
> * Does a column's case matter? ASSUMPTION: Any field that is
> * not obviously case insensitive is assumed to be case sensitive
> *
>
> >
> > Then, the column name is changed from StudentId to studentid, but the
> > "isCaseSensitive" flag is "true". I think it is not correct, since it
> > is impossible from now, when a user ask for the StudentId column to
> > retrieve it from a resultset. The "isCaseSensitive" don't authorize to
> > accept the string StudentId as a valid column name for the studentid
> > column in the ResultSet.
>
> Recommed you quote AS "StudentID" to get the behavior you desire.
>
> danap.
Does the "isCaseSensitive(int)" function return whether the "value" stored
in the column is case-sensitive or does it return whether the "name" of the
column is case-sensitive?
The OP is using it to determine whether the "name" is case-sensitive - which
it is always.
My assumption is that it would indicate whether the "value" is
case-sensitive - which is also true because varchar/text is case-sensitive.
The fact that different fields may or may not be case-sensitive supports
this since the "case-sensitive" property of a column "name" should be
constant throughout the database/product.
David J.
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: polobo@yahoo.com, danap@ttc-cmc.net, lmazuel@antidot.net
Subject: Re: Case-sensitive problem in AS clause?
In-Reply-To: <014801cd6372$e9d20850$bd7618f0$@yahoo.com>
References: <5004221A.4030508@antidot.net> <50043BC9.2090401@ttc-cmc.net> <014801cd6372$e9d20850$bd7618f0$@yahoo.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