Re: [HACKERS] Finding primary keys in a table - Mailing list pgsql-hackers

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: [HACKERS] Finding primary keys in a table
Date
Msg-id m0yyLLH-00006FC@druid.net
Whole thread Raw
In response to Re: [HACKERS] Finding primary keys in a table  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Finding primary keys in a table  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Thus spake Bruce Momjian
> > Can someone suggest a SQL statement to pull out the primary key(s) from
> > a table?
> Because we just create a unique index on a PRIMARY specification, I
> think any unique index on a field shows it as primary.

Hmm.  Any chance we can somehow flag it as well?  Perhaps a new bool
field in pg_index the next time we do a dump & reload release?  I
assume we will need it eventually anyway.

--
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] s_lock.h busted
Next
From: dg@illustra.com (David Gould)
Date:
Subject: Re: [HACKERS] s_lock.h busted