Re: setCatalog - Mailing list pgsql-jdbc

From Patrik Lundgren
Subject Re: setCatalog
Date
Msg-id 002501c3027d$f1612930$0300a8c0@energy
Whole thread Raw
In response to Re: setCatalog  (Dave Cramer <Dave@micro-automation.net>)
Responses Re: setCatalog
List pgsql-jdbc
>> Another question I have asked about earlier is about
>> DatabaseMetaData.getExportedKey(). I got the answer that it only
works
>> if one of the columns in a constraint is a primary key. My problem is

>> that I get an empty resultSet when asking for keys I know exist.
>> Someone else beside me who thinks this is wrong, even though the jdbc

>> spec might say otherwise?

>Can you define how you expect this to work? What are you looking for;
Foreign Keys that are related to non-primary keys in another table?

Well since a can create a foreign key that is related to a non-primary
key in another table it only seems natural that I should be able to find
out if it's there also...? The only demand from postgres seems to be
that the column in the other table is unique, not a primary key also.

jxDBCon returns the foreign keys, pgAdminII does also... By the way,
jxDBCon has a working setCatalog. Don't ask me how it's done, but it
works. It does have some other big problems though that makes it nearly
unusable for my cause, like getting 4096 as the length of all arrays.

In MSSQL for example I don't think you can create a foreign key if one
of the columns isn't a primary key, but in postgres I know it's
possible, therefore I think they should be able to be gotten as well,
please correct me if I'm wrong.

/Patrik


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: setCatalog
Next
From: Daniel Serodio
Date:
Subject: Re: error getString() --> decodeUTF8 /