Re: getExportedKeys/getImportedKeys

From: "Patrik Lundgren" <patrik(at)mensa(dot)se>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: getExportedKeys/getImportedKeys
Date: 2003-03-12 15:30:24
Message-ID: 004701c2e8ac$4d2f0020$0300a8c0@energy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I'm using the latest stable driver from jdbc.postgresql.org. By popular
demand I've attached an sql-file, but since I've had this problem with
all databases I've tested, there's really no need.

I've tested some java code from other people and I still get the same
problem. I'm attaching some java code I found in the archives. The url
needs to be changed before compilation.

The problem, so everyone understans correctly, is that I get an empty
ResultSet when asking for foreign keys. I've also tested the jdbxConn
driver and it returns the keys perfectly. The problem with that driver
is that it doesn't return the correct field lengths.

Regards,
Patrik

-----Ursprungligt meddelande-----
Fran: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] For Barry Lind
Skickat: Wednesday, March 12, 2003 4:12 PM
Till: Patrik Lundgren
Kopia: pgsql-jdbc(at)postgresql(dot)org
Amne: Re: [JDBC] getExportedKeys/getImportedKeys

Patrik,

If you provide a test case we can look into the problem.

thanks,
--Barry

Patrik Lundgren wrote:
> I'm having real problems with getting the foreign keys from my db. In
> fact I'm not getting it to work at all. I'm running postgresql 7.2 and
I
> noticed that the code for getting the keys is different for 7.2 and
7.3
> in AbstractJdbc1DatabaseMetaData.java. I've tested all different
> parameters I can think of but still not getting any results. I've made

> sure that the table parameter is correct and passed null for catalog
and
> schema. Is the method not working or what can I be doing wrong?
>
> Desperate... Thanks in advance for any help! Btw I'm making a database
> admin tool for multiple databases so I really need this to work or my
> diagrams won't look so good.
>
> Regards,
> Patrik Lundgren

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Attachment Content-Type Size
photoalbum.sql application/octet-stream 629 bytes
TestKeys.java application/octet-stream 1.4 KB

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mario Rodriguez Villanea 2003-03-12 15:31:53 Batch update error
Previous Message Barry Lind 2003-03-12 15:16:50 Re: getExportedKeys/getImportedKeys