Re: setCatalog

From: "Patrik Lundgren" <patrik(at)mensa(dot)se>
To: "'Dave Cramer'" <Dave(at)micro-automation(dot)net>
Cc: "'postgres'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: setCatalog
Date: 2003-04-14 12:04:03
Message-ID: 002501c3027d$f1612930$0300a8c0@energy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Daniel Serodio 2003-04-14 12:40:50 Re: error getString() --> decodeUTF8 /
Previous Message Dave Cramer 2003-04-14 11:31:47 Re: setCatalog