Received: from mta03.mail.mel.aone.net.au (mta03.mail.au.uu.net [203.2.192.83]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1HKc3E66173 for ; Sun, 17 Feb 2002 15:38:03 -0500 (EST) (envelope-from justin@postgresql.org) Received: from postgresql.org ([63.60.218.117]) by mta03.mail.mel.aone.net.au with ESMTP id <20020217203802.PFUF17407.mta03.mail.mel.aone.net.au@postgresql.org>; Mon, 18 Feb 2002 07:38:02 +1100 Message-ID: <3C701435.B60ECB76@postgresql.org> Date: Mon, 18 Feb 2002 07:36:05 +1100 From: Justin Clift X-Mailer: Mozilla 4.78 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Tiago Antao CC: PostgreSQL JDBC Subject: Re: DatabaseMetadata References: <1013968036.547.18.camel@lisboa> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200202/114 X-Sequence-Number: 3072 Hi Tiago, You should try the PostreSQL 7.2 JDBC driver, as it has support for DatabaseMetadata and is backwards compatible with PG 7.1.3. http://jdbc.postgresql.org :-) Regards and best wishes, Justin Clift Tiago Antao wrote: > > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org -- "My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - Indira Gandhi