9.0 JDBC driver reporting invalid primary key meta data

From: "Adam Rauch" <adam(at)labkey(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: 9.0 JDBC driver reporting invalid primary key meta data
Date: 2010-08-03 22:18:14
Message-ID: 006901cb3359$c4f493e0$4eddbba0$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Requesting primary key meta data via the JDBC driver [i.e.,
conn.getMetaData().getPrimaryKeys()] against PostgreSQL 9.0 reports
incorrect meta data for tables whose PK column(s) has been renamed. I'm
testing this against the latest 9.0 driver
(http://jdbc.postgresql.org/download/postgresql-9.0dev-800.jdbc4.jar
<http://www.google.com/url?sa=D&q=http://jdbc.postgresql.org/download/postgr
esql-9.0dev-800.jdbc4.jar&usg=AFQjCNE8mRwfaMyn6yLoWT4wrlpYnhbl0A> ) and the
PostgreSQL 9.0 Beta 4 release. I initially reported this problem during Beta
1 to the pgsql-testers alias; more details and repro code are here:
http://archives.postgresql.org/pgsql-testers/2010-05/msg00003.php

My understanding is this is an intentional compatibility break by the server
team that will require a change to the JDBC driver. The issue is of course
trivial to avoid or work around in a test environment, but it's a
showstopper for production environments. Many applications like ours must
operate on tables, columns, and constraints without any inherent knowledge
of or control over these database objects or their history; we rely
exclusively on information from the database server and simply can't
function with invalid meta data being reported.

Let me know if you need more information or if I can help with testing,
debugging, etc.

Thanks,

Adam

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jason Tesser 2010-08-06 10:13:38 9.0 Driver
Previous Message Alexander Yerenkow 2010-08-03 06:57:17 Re: "Mons" in JDBC driver