pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Rauch <adam@labkey.com>
To: pgsql-jdbc@postgresql.org
Subject: 9.0 JDBC driver reporting invalid primary key meta data
Date: Tue, 3 Aug 2010 15:18:14 -0700
Message-ID: <006901cb3359$c4f493e0$4eddbba0$@com> (raw)

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

view thread (3+ messages)  latest in thread

Message-ID: <006901cb3359$c4f493e0$4eddbba0$@com>
Permalink:  ../006901cb3359$c4f493e0$4eddbba0$@com/
Also on:    postgresql.org/message-id/006901cb3359$c4f493e0$4eddbba0$@com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: adam@labkey.com
  Subject: Re: 9.0 JDBC driver reporting invalid primary key meta data
  In-Reply-To: <006901cb3359$c4f493e0$4eddbba0$@com>
  References: <006901cb3359$c4f493e0$4eddbba0$@com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox