Re: how to get primary / unique key on table ? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: how to get primary / unique key on table ?
Date
Msg-id Pine.LNX.4.44.0208040115190.29827-100000@cm-lcon1-46-187.cm.vtr.net
Whole thread Raw
In response to how to get primary / unique key on table ?  ("Ahmad Munif" <munif@hotpop.com>)
List pgsql-general
Ahmad Munif dijo:

> how to get field on table that primary/unique key ?
> does postgres have function to get that field name ?

You can look it up in system catalogs.  Fire up psql -E and do a
\d sometable

The last query looks up indexes.  You can poke around some more to get
the information you need.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
www.google.com: interfaz de linea de comando para la web.


pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Searching accented words
Next
From: Alvaro Herrera
Date:
Subject: Re: Index scan ???