Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 361EF55C5A4 for ; Mon, 16 Jul 2012 13:49:48 -0300 (ADT) Received: from smtp104.prem.mail.ac4.yahoo.com ([76.13.13.43]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1SqoUS-0002A9-Ak for pgsql-jdbc@postgresql.org; Mon, 16 Jul 2012 16:49:47 +0000 Received: (qmail 4788 invoked from network); 16 Jul 2012 16:49:30 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language; b=06q2gniYycTpFDlhnqBdodU7n3LHI227CTuGa4vKzf4W8AOADOcGlAqQpTudLemAgzHmHKziHhaAUVpSWv/4vM08VuRM7qQQTE+ZEPTGPvh2hPqnuNmIJqhE2SeM1kWtKFuBY6vZZuXrnKBln7uMVZlZOlUX81lcC12nzquaNv4= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1342457370; bh=T71D8oYk1aLGbOoeCNKz9U3Xj+qh6f70mWAuHXXVkwk=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language; b=icXs2MWiEi4IWJUNjLIrGOsFHjUJFv2AwHHGBf0U8ps2BSzHzsUrjRqzbfSScc5yE9nmI8TTwcJ2b480UytWwIizqFHBKdex8vIAYS5jtVSZdUj4sVVc1J4+EdjL/Fgw9se6REhOdhYiH8OE6EQsoDzjQKZsZoUchDrUBdaFcEA= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: czOAyMIVM1mnsmICK8GFtZFI82tDzgK8BE711Tl43dSRgf7 UiNBLaurviVC6e9wpZtJyMpkDxsXdOxSSpboOrb6Yboa1xOsTbBX8TmCA_qS wLwH3s64VettXhdb6qAsOjg2_4KFLrPat7w2HoFWX4wBlRpGp1YB_QEHivOc 5YnsKJvn7pppluAQsWDupx6aag.9lldpA_Tr7ZHTiQ1OXacRB50GJML57WFG PCyK6K5sNM2nCw3SbSGgfWvSusbdhxueuHdvhBH82DHNVYSlDcypcbi3G8yb QcFCYVLgg7SU.zIsPkx9Jv9UnZGn16du_LYY.Lb4BiO305Gc.aQfxoq2cKw7 JIJ.iEQ4wsyL379IZqI8nrV2fsB9lOxlNJGWM9GXEiCFbt7LW3co0rXrdPSk CdPX2VmivUf1S5YtJHBs.XSWlgkkmAaTSorQApwfVkMmBnqG70R6A9.CDZyL HkjYMwR9AYI59FnYRZw-- X-Yahoo-SMTP: mpGJl6eswBD2IBufoVEg0Pa8gg-- Received: from WolfDog (polobo@24.93.23.188 with login) by smtp104.prem.mail.ac4.yahoo.com with SMTP; 16 Jul 2012 09:49:29 -0700 PDT From: "David Johnston" To: "'dmp'" , "'Laurent Mazuel'" , "'PostgreSQL JDBC'" References: <5004221A.4030508@antidot.net> <50043BC9.2090401@ttc-cmc.net> In-Reply-To: <50043BC9.2090401@ttc-cmc.net> Subject: Re: Case-sensitive problem in AS clause? Date: Mon, 16 Jul 2012 12:49:05 -0400 Message-ID: <014801cd6372$e9d20850$bd7618f0$@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJYDGlH4sFG2EWecVJTMwXBfqnzQgKIdwmXlgKHDLA= Content-Language: en-us X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201207/16 X-Sequence-Number: 23114 > -----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.