pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
JDBC and MetaData and Primary Keys... oh my? 2+ messages / 2 participants [nested] [flat]
* JDBC and MetaData and Primary Keys... oh my? @ 2000-06-28 07:21 William Swaney <william@digitalsesame.com> 0 siblings, 0 replies; 2+ messages in thread From: William Swaney @ 2000-06-28 07:21 UTC (permalink / raw) To: 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. ^ permalink raw reply [nested|flat] 2+ messages in thread
* RE: JDBC and MetaData and Primary Keys... oh my? @ 2000-06-28 07:42 Peter Mount <petermount@it.maidstone.gov.uk> 0 siblings, 0 replies; 2+ messages in thread From: Peter Mount @ 2000-06-28 07:42 UTC (permalink / raw) To: 'William Swaney' <william@digitalsesame.com>; pgsql-interfaces As we don't use catalog's nor schemas yet (there's discussions about them on hackers at the moment), you can set them to null. It should give some result. I'll add it to the list of things to check. Peter -- Peter Mount Enterprise Support Maidstone Borough Council Any views stated are my own, and not those of Maidstone Borough Council -----Original Message----- From: William Swaney [mailto:william@digitalsesame.com] Sent: Wednesday, June 28, 2000 8:21 AM To: pgsql-interfaces@postgresql.org Subject: [INTERFACES] JDBC and MetaData and Primary Keys... oh my? 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. ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-06-28 07:42 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2000-06-28 07:21 JDBC and MetaData and Primary Keys... oh my? William Swaney <william@digitalsesame.com> 2000-06-28 07:42 RE: JDBC and MetaData and Primary Keys... oh my? Peter Mount <petermount@it.maidstone.gov.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox