Re: How to find non-unique indexes in system tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Eric Johnson" <ericlj63(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to find non-unique indexes in system tables
Date: 2007-11-06 15:54:12
Message-ID: 21058.1194364452@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Eric Johnson" <ericlj63(at)gmail(dot)com> writes:
> I can find all the check constraints, primary keys and foreign keys in
> the information schema, but I cannot find the non-unique indexes. Is
> there anyplace to get that information (name, columns, etc)?

Not from the information_schema, because "index" is actually not a
concept in the SQL standard. Unique constraints are in the spec,
so you can see those via information_schema, but for other sorts
of indexes you have to look directly at the PG catalogs.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message phazon 2007-11-06 16:09:08 ORDER BY a string
Previous Message Scott Marlowe 2007-11-06 15:52:42 Re: external editor for psql