Skip site navigation (1) Skip section navigation (2)

determine if a column is UNIQUE using metadata

From: "Peter Michaux" <petermichaux(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: determine if a column is UNIQUE using metadata
Date: 2008-01-20 00:43:00
Message-ID: 3cbaf1c80801191643p582cf7fasd5f5a19564c1da08@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hi,

I've been trying to determine if a column is UNIQUE. I've been trying
to use the following

connection.getMetaData().getIndexInfo(null, "", "comment", false, true);

but it always says that the columns are not unique.

Am I on the right track with the above technique or should I be trying
to do something totally different?

Thanks,
Peter

Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2008-01-20 15:15:19
Subject: Re: determine if a column is UNIQUE using metadata
Previous:From: Mike C.Date: 2008-01-18 22:58:18
Subject: Re: trying to connect to pg from within a local network

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group