DatabaseMetaData.getCrossReference(...)

From: Friedrich Schaeuffelhut <fries(at)oasis(dot)desert(dot)lnp(dot)org>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: DatabaseMetaData.getCrossReference(...)
Date: 2003-04-03 17:30:43
Message-ID: Pine.LNX.4.44.0304031904010.14392-100000@oasis.desert.lnp.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Hi

I have a litte problem with the Postgres 7.3.2 jdbc driver:
File: org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java

The function DatabaseMetaData.getCrossReference(..) provides information
about how tables reference each other. Thereby there is a field fk_name
which should contain the name of the foreign key. But the value of this
field is "fk_name\000..\000..". While crawling through the source I
discovered that the retuned value is taken from the column pg_trigger.tgargs
instead of pg_trigger.tgconstrname.

Further more I saw, that the field pg_trigger.tgconstrname is selected and
in Line 3061 fKeyName is retrieved from the resultset, but never used again:

L3061: String fKeyName = rs.getString(5);

In Line 3140 targs.getBytes() is then assigned to the return tuple:

L3140: tuple[11] = targs.getBytes(); //FK_NAME this will give us a
//unique name for the foreign key

Is there any reason for this, besides to be shure the name is unique?
I just need the constraint name not an other unique name.
I tested the behaviour of an Informix JDBC driver and got just the
constraint name.

Thank you

Friedrich

--
_
Friedrich Schäuffelhut | |_ _ _
e-mail: fries(at)desert(dot)lnp(dot)org | | '\| '_\ LNP is a
|_|_|_| '_/ Network Project
|_|

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Scot P. Floess 2003-04-03 17:31:35 Re: PLS HELP in connecting with jdbc driver
Previous Message Ryan Christianson 2003-04-03 17:21:01 Re: Jdbc3PoolingDataSource default auto commit is false