Column names getting lower-case in SELECT statements when issued via JDBC

From: "Eduardas F(dot)" <tcpa252(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Column names getting lower-case in SELECT statements when issued via JDBC
Date: 2011-05-15 19:04:34
Message-ID: BANLkTimgO_Be+WVW0qTnX8ZrGwbtvSXqhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello everyone, today I encountered this nasty problem:
Whenever you issue an SELECT command from JDBC (prepared statement) you end
up with column X does not exist. And column X name is shown in lower-case
As I understand, PostgreSQL Server or PostgreSQL JDBC driver converts column
names containing upper-case letters to lower-case? Is there an easy way to
bypass this behaviour? (Channing column names is not an option).

Here's an example of crashing SELECT: "SELECT password, accessLevel,
lastServer, userIP FROM accounts WHERE login=?"
You end up with 'column "accesslevel" does not exist'.

Thanks for help in advance.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jerry Sievers 2011-05-15 19:26:08 Re: Column names getting lower-case in SELECT statements when issued via JDBC
Previous Message Tarlika Elisabeth Schmitz 2011-05-15 18:44:56 Re: Role for CSV import