Switching from MySQL to PostgreSQL, JDBC drivers behaving differently - Mailing list pgsql-jdbc

From Matthias Karlsson
Subject Switching from MySQL to PostgreSQL, JDBC drivers behaving differently
Date
Msg-id 20070304141231.351EE14D8C7@smtp-2.sys.kth.se
Whole thread Raw
Responses Re: Switching from MySQL to PostgreSQL, JDBC drivers behaving differently  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
Hi,

I originally had a much longer mail written describing in detail why I had a
problem with my current framework, but I decided to go with a simple
question instead :)

If I submit the following query to PostgreSQL:

select a.*, b.* from A a
inner join B b on b.id = a.b_id

where (for instance) both A and B have a column named 'name', is it possible
to distinguish between the two without using explicit positioning with the
JDBC interface? That is, with the MySQL driver, I can write:

rs.getString("a.name") and rs.getString("b.name"), but this doesn't seem to
work with PostgreSQL.

Sincerely,
Matthias Karlsson


pgsql-jdbc by date:

Previous
From: Alex Malone
Date:
Subject: Re: TimestampUtils.toString() speedup
Next
From: peter royal
Date:
Subject: Re: statement caching proof of concept redux