Re: [jason@netspade.com: DatabaseMetaData.java.diff] - Mailing list pgsql-jdbc

From Jason Davies
Subject Re: [jason@netspade.com: DatabaseMetaData.java.diff]
Date
Msg-id 20011103065440.A18365@netspade.com
Whole thread Raw
In response to Re: [jason@netspade.com: DatabaseMetaData.java.diff]  ("Dave Cramer" <Dave@micro-automation.net>)
Responses Re: [jason@netspade.com: DatabaseMetaData.java.diff]  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-jdbc
Dave,

Here is yet another patch for DatabaseMetaData which does several things:
a) Currently an extra key is returned in both getExportedKeys() and getImportedKeys(). So a foreign key relationship,
duplicatekeys are returned. This has been fixed. 
b) PK_NAME is now returned.
c) The whole SQL query has been optimized (no more ugly inner selects).
d) The getExportedKeys() and getImportedKeys() implementation has been put into a single getImportedExportedKeys() to
saveduplcating the code. 
e) KEY_SEQ is now also returned.

There is however one problem to do with multiple foreign key columns. Should they be returned as a single row,
separatedby commas? Or returned in separate rows? By multiple foreign key columns I mean, "alter table ptable add
constraintptable_fkey foreign key (pcol1, pcol2) references ftable (fcol1, fcol2)". 

I think returning separate rows is the most correct way to do it, assuming the SQL statement above is equivalent to 2
separatefkeys. 

Any comments are welcome,

Jason

On Fri, Nov 02, 2001 at 07:04:16PM -0500, Dave Cramer wrote:
> Jason,
>
> The current sources should be patched as per your patch. I also fixed
> jdbc1 so it would compile
>
> Dave
>
> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Jason Davies
> Sent: November 2, 2001 5:16 PM
> To: Dave Cramer
> Cc: PostgreSQL JDBC
> Subject: [JDBC] [jason@netspade.com: DatabaseMetaData.java.diff]
>
>
>
> Sorry, I forgot to attach the file. How embarrassing :)
>
> --
> Jason Davies
>
> jason@netspade.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
Jason Davies

jason@netspade.com

Attachment

pgsql-jdbc by date:

Previous
From: "Mitchell J. Friedman"
Date:
Subject: BUG and FIX: getTables - SYSTEM TABLE
Next
From: Nikola Milutinovic
Date:
Subject: Encoding weirdness with JDBC, driver crashing?