JDBC Metadata bug

From: Christopher Marshall <cmarshall(at)jlc(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: JDBC Metadata bug
Date: 2003-08-13 12:02:53
Message-ID: 3F3A28ED.3060504@jlc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Christopher Marshall
Your email address : cmarshall(at)infoclarus(dot)com

System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Celeron

Operating System (example: Linux 2.0.26 ELF) :
Server on Linux 2.4.20-6 (Red Hat)
Client on Windows 2000 Server with SP4

PostgreSQL version (example: PostgreSQL-7.3.4): PostgreSQL-7.3.4

Compiler used (example: gcc 2.95.2) : gcc 3.2.2

Please enter a FULL description of your problem:
------------------------------------------------
With foreign keys that are made up of multiple columns the JDBC
DatabaseMetaData method getExportedKeys() returns a ResultSet wth single
row per foreign key irrespective of the number of columns. The fields
FKCOLUMN_NAME and PKCOLUMN_NAME contain a comma separated list of the
column names in the foriegn key. The javadoc from Sun leads one to
believe that there should be one row in the ResultSet per column so a
foreign key with three columns should cause three rows in the ResultSet.
Both Oracle 8.1.7 and MS SQL Server 2000 behave this way and generate
one row per column in the foreign key.

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
Create a table with a primary key with two or more columns. Create another
table with the same columns and atleast one more in its primary key. Create
a foreign key from the second table to the first based on the columns in the
first table.
The java using JDBC should include a getExportedKeys() using the name of
the first table.

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

Browse pgsql-bugs by date

  From Date Subject
Next Message Bertrand Petit 2003-08-13 12:56:45 7.4 beta 1: SET log_statement=false
Previous Message Donald Fraser 2003-08-13 10:40:08 Partial Indexes condtions