Re: How to discern a reference column from within java?? - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: How to discern a reference column from within java??
Date
Msg-id 1023679088.1646.801.camel@inspiron.cramers
Whole thread Raw
In response to How to discern a reference column from within java??  ("David A. Bartmess" <dingodave@edingo.net>)
Responses Re: How to discern a reference column from within java??
List pgsql-jdbc
David,

Have a look at the getImported, getExported in the databasemetadata
class

Dave
On Sun, 2002-06-09 at 13:51, David A. Bartmess wrote:
>
> I am trying to figure out how to discern a reference column (as shown
> below) inside a java object containing the various columns in a specific
> row of a table.
>
> The table looks like:
>
> CREATE TABLE TempTbl AS
> (
>     id    serial,
>     type    int references TypesTbl
> );
>
> But I cannot find a way inside the jdbc API to figure out if a
> particular column is a reference to another table's row. Such as:
>
> // These are examples of possible code
> TempTbl tmptbl = new TempTbl();
> tmptbl.connect();
> tmptbl.readRow();
>
> ...
> if (tmptbl.getColumn("type").isReference())
> {
>     TypesTbl typestbl = new TypesTbl();
>     tmptbl.setColumn("type",
>         typestbl.getRowRef(tmptbl.getColumn("type"));
> }
>
> Am I missing something in the API?
>
> Thanks for any help!
> --
> David A. Bartmess
> Software Configuration Manager / Sr. Software Developer
> eDingo Enterprises
> http://edingo.net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>




pgsql-jdbc by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: implementing query timeout
Next
From: "David A. Bartmess"
Date:
Subject: Re: How to discern a reference column from within java??