pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: William Swaney <william@digitalsesame.com>
To: pgsql-interfaces@postgresql.org
Subject: JDBC and MetaData and Primary Keys... oh my?
Date: Wed, 28 Jun 2000 15:21:11 +0800
Message-ID: <3959A767.2A10BAB7@digitalsesame.com> (raw)

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.



view thread (2+ messages)  latest in thread

Message-ID: <3959A767.2A10BAB7@digitalsesame.com>
Permalink:  ../3959A767.2A10BAB7@digitalsesame.com/
Also on:    postgresql.org/message-id/3959A767.2A10BAB7@digitalsesame.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: william@digitalsesame.com
  Subject: Re: JDBC and MetaData and Primary Keys... oh my?
  In-Reply-To: <3959A767.2A10BAB7@digitalsesame.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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