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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-jdbc by date

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