Re: getExportedKeys/getImportedKeys

From: Barry Lind <blind(at)xythos(dot)com>
To: Patrik Lundgren <patrik(at)mensa(dot)se>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: getExportedKeys/getImportedKeys
Date: 2003-03-12 15:16:50
Message-ID: 3E6F4F62.701@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Patrik,

Another thing you mention you are using 7.2. Are you using 7.2 for both
the driver and the server? If so have you tried using the 7.3 driver
against the 7.2 server? This is a supported setup and the 7.3 driver
has a significant number of fixes in this area.

thanks,
--Barry

Patrik Lundgren wrote:
> Well, that is one ting we can rule out. I've made sure that the table
> name is correct. I've tested lower case, upper case and everything in
> between. Does anyone have any experience with using this function with
> 7.2? Again my problem is that getExportedKeys/getImportedKeys returns an
> empty ResultSet.
>
> Regards,
> Patrik Lundgren
> -----Ursprungligt meddelande-----
> *Från:* pgsql-jdbc-owner(at)postgresql(dot)org
> [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] *För *Carl Olivier
> *Skickat:* Wednesday, March 12, 2003 1:13 PM
> *Till:* Patrik Lundgren; pgsql-jdbc(at)postgresql(dot)org
> *Ämne:* Re: [JDBC] getExportedKeys/getImportedKeys
>
> Hi.
> PostGreSql is CASE SESITIVE - for creating foreign keys etc. This
> seems to hold true for meta data retrieval etc (I admit to having
> somne trouble with this).
>
> So, if you are passing the table pattern through - ensure that it is
> LOWER CASE ( *I think* ).
>
> One other thing that I found funny with the JDBC implementation is this.
>
> Data Type TEXT - when you get the meta data back for a column of
> type TEXT, the data type int (as specified in
> java.sql.Types.LONGVARCHAR) - wich is what TEXT is - return 12 -
> this si incorrect according to java.sql.Types - it should be
> returning -1, as 12 is the VARCHAR java.sql.Types datatype id.
>
> I am using version 7.3, not 7.2 so not sure if this was a bug back
> and has been fixed...
>
> Best regards,
>
> Carl
>
> -----Original Message-----
> *From:* pgsql-jdbc-owner(at)postgresql(dot)org
> [mailto:pgsql-jdbc-owner(at)postgresql(dot)org]*On Behalf Of *Patrik
> Lundgren
> *Sent:* 12 March 2003 01:41 PM
> *To:* pgsql-jdbc(at)postgresql(dot)org
> *Subject:* [JDBC] getExportedKeys/getImportedKeys
>
> 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Patrik Lundgren 2003-03-12 15:30:24 Re: getExportedKeys/getImportedKeys
Previous Message Barry Lind 2003-03-12 15:12:22 Re: getExportedKeys/getImportedKeys