Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UdMUk-0007YO-Fy for pgsql-jdbc@arkaria.postgresql.org; Fri, 17 May 2013 15:22:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UdMUj-0002nl-MM for pgsql-jdbc@arkaria.postgresql.org; Fri, 17 May 2013 15:22:57 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UdMUi-0002mX-CK for pgsql-jdbc@postgresql.org; Fri, 17 May 2013 15:22:56 +0000 Received: from mail-out.m-online.net ([212.18.0.10]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UdMUf-00054u-Fl for pgsql-jdbc@postgresql.org; Fri, 17 May 2013 15:22:55 +0000 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3bBtY71pmBz3hhb7 for ; Fri, 17 May 2013 17:22:50 +0200 (CEST) Received: from [192.168.178.20] (ppp-46-244-163-76.dynamic.mnet-online.de [46.244.163.76]) by mail.mnet-online.de (Postfix) with ESMTP id 3bBtY662bnzbcm5 for ; Fri, 17 May 2013 17:22:47 +0200 (CEST) Message-ID: <51964B4A.2080504@gmx.net> Date: Fri, 17 May 2013 17:22:50 +0200 From: Thomas Kellerer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 MIME-Version: 1.0 Newsgroups: gmane.comp.db.postgresql.jdbc To: pgsql-jdbc@postgresql.org Subject: Re: DatabaseMetaData.getTables returns lower-case column names References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org J=C3=BAlius =C5=A0troffek wrote on 17.05.2013 17:06: > I am using eclipselink with pgsql jdbc driver '9.2-1002 JDBC 4' and > when eclipselink tries to get the list of available tables using the > ${subject} function PostgreSQL JDBC will return the result having the > column names lower case. > > The JDBC API clearly describes them as upper-case, see > http://docs.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#g= etTables%28java.lang.String,%20java.lang.String,%20java.lang.String,%20java= .lang.String[]%29 I don't see any statement that claims the table or column names should be r= eturned in upper case. The driver should always return the names as _stored in the database_ which= could mean lowercase, uppercase or mixed case depending on the DBMS. To fi= nd out _how_ the DBMS stores them you can use storesLowerCaseIdentifiers(),= storesMixedCaseIdentifiers() and storesUpperCaseIdentifiers() > Is there any reason why the names are returned as lower case? Yes, because Postgres stores all (unquoted) identifiers in lowercase. --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc