Received: from smtp014.mail.yahoo.com (smtp014.mail.yahoo.com [216.136.173.58]) by postgresql.org (8.11.3/8.11.4) with SMTP id g1HIGnE50334 for ; Sun, 17 Feb 2002 13:16:49 -0500 (EST) (envelope-from tra_ejb@yahoo.com) Received: from 62-72-193-10.edialup.vizzavi.nl (HELO localhost.localdomain) (62.72.193.10) by smtp.mail.vip.sc5.yahoo.com with SMTP; 17 Feb 2002 18:16:46 -0000 Subject: DatabaseMetadata From: Tiago Antao To: PostgreSQL JDBC Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1013968036.547.18.camel@lisboa> Mime-Version: 1.0 X-Mailer: Evolution/1.0.2 Date: 17 Feb 2002 19:15:56 +0100 X-Archive-Number: 200202/113 X-Sequence-Number: 3071 Hi! I am doing a project that involves the use of the DatabaseMetadata, namely I need Foreign keys... A few things that I have found: 1. PgSQL does not have FK meta-data available for foreign keys as they are implemented with triggers 2. Accordingly the driver cannot supply meta-data (check eg, DatabaseMetadata.getImportedKeys), which is correct, but... 3. getImportedKeys always returns a null, which very easely breaks any JDBC code, as is very far way from what is expected 4. I think the best solution would be to return an empty ResultSet, or at least raise a SQL Exception (I would favour the first). 5. I could volunteer to try to implement better return for these type of functions (it seems to be easy), if you agree with my solution just say and I will try to implement it. I am stuck with Oracle because of this... Best regards, Tiago PS - I have 7.1.3 source _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com