Re: Performance improvement proposal. Removal of toLowerCase calls.

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Performance improvement proposal. Removal of toLowerCase calls.
Date: 2014-01-16 20:21:30
Message-ID: lb9evn$5cc$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dave Cramer wrote on 16.01.2014 20:51:
>
> Are you sure ? This is in the resultset, so any column names should have come back from the db.
> Which means that they should come back in lower case anyway.
>
> create table foo
> (
> "ID" integer,
> "Bar" varchar
> );
>
> select *
> from foo;
>
> Should return ID and Bar as the column names.
>
>
> Exactly! While I haven't actually tested the code. The lines that Jeremy is referring to would seem to suggest that
>the return columns would be id and bar.
>
> Does anyone have time to test this ?

The current driver returns this correctly for a ResultSet.

Here is a "transcript" from running my application on the console
(easier to copy & paste than a screenshot)

SQL Workbench/J console interface started.
Enter 'exit' to quit.
Enter 'WbHelp' for a list of SQL Workbench/J specific commands
Config directory: C:\Projects\sqlworkbench\conf

SQL> wbconnect {Postgres}/WbTest;
Connection to "User=thomas, Schema=public, URL=jdbc:postgresql://localhost/wbtest" successful

thomas(at)wbtest/public> create table foo ("ID" integer, "Bar" varchar, "FoBaR" varchar);
Table 'foo' created
thomas(at)wbtest/public> insert into foo values (1, 'foo', 'bar');
INSERT executed successfully
1 row affected
thomas(at)wbtest/public> select * from foo;
ID | Bar | FoBaR
---+-----+------
1 | foo | bar

(1 Row)
SELECT executed successfully
thomas(at)wbtest/public>

All the various API calls in DatabaseMetaData do return identifiers in the correct case as well.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message dmp 2014-01-16 20:33:27 Re: Performance improvement proposal. Removal of toLowerCase calls.
Previous Message Dave Cramer 2014-01-16 19:51:42 Re: Performance improvement proposal. Removal of toLowerCase calls.