Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 4FAF263255E for ; Tue, 3 Aug 2010 19:25:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 10314-01 for ; Tue, 3 Aug 2010 22:25:14 +0000 (UTC) X-Greylist: delayed 00:07:19.423743 by SQLgrey-1.7.6 Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mail.postgresql.org (Postfix) with ESMTP id 9A54E632541 for ; Tue, 3 Aug 2010 19:25:15 -0300 (ADT) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 7D94919BC47 for ; Tue, 3 Aug 2010 18:17:54 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Tue, 03 Aug 2010 18:17:54 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:subject:date:message-id:mime-version:content-type; s=smtpout; bh=VpY3Pu73dqZ4W+pDwqARzIHdulg=; b=L8GnPkRWbX9Nkz6BNyCT9PmFJdTGVzGLMG2L86tuI0pdLsIlyX/HYbvKzHerBxMTJrhBvJibZ3qAEnV317E610I/clVyEUhwOWEIwfWdjdy8dPj/xD3eRlzMijQQOt3m867XlVVz7xKszdTAlH8dpQHn/CdwY+2S7SX51u869dY= X-Sasl-enc: OrNMwKcnVmJTyryQjAS4IZ5V4GbfJmmzibP0Azw9xigB 1280873874 Received: from AdamE6400 (DHCP155063.FHCRC.ORG [140.107.155.63]) by mail.messagingengine.com (Postfix) with ESMTPSA id 04F484D275F for ; Tue, 3 Aug 2010 18:17:53 -0400 (EDT) From: "Adam Rauch" To: 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> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_006A_01CB331F.1895BBE0" X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us Thread-Index: AcszWcPoE2S2XOKwSSuXM1zW8PrI6A== X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201008/10 X-Sequence-Number: 20813 This is a multi-part message in MIME format. ------=_NextPart_000_006A_01CB331F.1895BBE0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ) 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 ------=_NextPart_000_006A_01CB331F.1895BBE0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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-8= 00.jdbc4.jar) 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

------=_NextPart_000_006A_01CB331F.1895BBE0--