Re: JDBC getImortedKeys() getExportedKeys() incorrect ON

From: Kris Jurka <books(at)ejurka(dot)com>
To: Richard Froud <rfroud(at)ntlworld(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC getImortedKeys() getExportedKeys() incorrect ON
Date: 2003-11-03 10:25:31
Message-ID: Pine.LNX.4.33.0311030522150.29431-300000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-jdbc

On Fri, 15 Aug 2003, Richard Froud wrote:

> Please enter a FULL description of your problem:
> ------------------------------------------------
> When reading database metadata for foreign keys using the JDBC
> DatabaseMetaData.getImportedKeys() and DatabaseMetaData.getExportedKeys()
> methods the ON UPDATE rule is returned as the ON DELETE rule. It is also
> correctly returned as the ON UPDATE rule. Therefore there is no way to
> access the ON DELETE rule. Consequenntly innaccurate representations of the
> database structure are obtained.

Here is a patch for this. Additionally the on delete rule would not
return importedKeyRestrict because of a missing if statement. Also an
addition to the test suite is attached.

Kris Jurka

Attachment Content-Type Size
fkactions_test.patch text/plain 1.8 KB
fkactions_fix.patch text/plain 1.4 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Martin Edlman 2003-11-03 11:03:27 Repeatedly breaking indexes
Previous Message Kris Jurka 2003-11-03 09:45:46 Re: Bug #886: jdbc "update row" can mess up other columns

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2003-11-03 10:47:42 Re: Driver.acceptsURL(String) not working correctly
Previous Message Kris Jurka 2003-11-03 09:45:46 Re: Bug #886: jdbc "update row" can mess up other columns