Re: setCatalog
От | Patrik Lundgren |
---|---|
Тема | Re: setCatalog |
Дата | |
Msg-id | 002501c3027d$f1612930$0300a8c0@energy обсуждение исходный текст |
Ответ на | Re: setCatalog (Dave Cramer <Dave@micro-automation.net>) |
Ответы |
Re: setCatalog
|
Список | 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 по дате отправления: