JDBC and MetaData and Primary Keys... oh my? - Mailing list pgsql-interfaces

From William Swaney
Subject JDBC and MetaData and Primary Keys... oh my?
Date
Msg-id 3959A767.2A10BAB7@digitalsesame.com
Whole thread Raw
List pgsql-interfaces
Hello All,

I'm sorry if this has come up before, but I tried searching the archives
and didn't see my question.

I'm using Postgres 6.5.1 on Linux with the appropriate JDBC driver for
jdk 1.2.x.

What I'm having trouble with is some of the JDBC DatabaseMetaData
methods.  Specifically, if I try the following:

primaryKeysResultSet = myDBMetaData.getPrimaryKeys( catalog, schema,
tableName );

The result returned is always empty.  Let's assume, I hope, that I
defined the table properly, eg:

create table test_table (column1        int4,column2        Varchar(25),PRIMARY KEY (column1)
);

Does anyone know if this should work?  If so, what should values for
catalog and schema be?  I get similar empty results when looking for
indexes.  Listing the tables in a database works fine though.

Any help is really appreciated!

Bill



-- 
Upon seeing the box was too small, Schroedinger's Elephant breathed a
sigh of relief.


pgsql-interfaces by date:

Previous
From: moenk S
Date:
Subject: DB-servlet-applet communication
Next
From: Peter Mount
Date:
Subject: RE: Need help getting JDBC setup.