DatabaseMetaData.getCrossReference(...) - Mailing list pgsql-jdbc

From Friedrich Schaeuffelhut
Subject DatabaseMetaData.getCrossReference(...)
Date
Msg-id Pine.LNX.4.44.0304031904010.14392-100000@oasis.desert.lnp.org
Whole thread Raw
Responses Re: DatabaseMetaData.getCrossReference(...)
List 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@desert.lnp.org               | | '\| '_\ LNP is a
                                           |_|_|_| '_/ Network Project
                                                 |_|


pgsql-jdbc by date:

Previous
From: Davide Romanini
Date:
Subject: Again about charset encoding and accents
Next
From: Pedro Salazar
Date:
Subject: JDBC get object - (Geometry Postgis)