Received: from localhost.localdomain (143.c148.ethome.net.tw [202.178.148.143]) by hub.org (8.10.1/8.10.1) with ESMTP id e5S7I9197143 for ; Wed, 28 Jun 2000 03:18:09 -0400 (EDT) Received: from digitalsesame.com (bill@[10.0.0.1]) by localhost.localdomain (8.9.3/8.9.3) with ESMTP id PAA13827 for ; Wed, 28 Jun 2000 15:05:01 +0800 Message-ID: <3959A767.2A10BAB7@digitalsesame.com> Date: Wed, 28 Jun 2000 15:21:11 +0800 From: William Swaney X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: JDBC and MetaData and Primary Keys... oh my? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200006/112 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.