Re: [HACKERS] Finding primary keys in a table

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Finding primary keys in a table
Date: 1998-07-20 19:11:23
Message-ID: m0yyLLH-00006FC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at){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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Gould 1998-07-20 19:15:46 Re: [HACKERS] s_lock.h busted
Previous Message Bruce Momjian 1998-07-20 17:46:21 Re: [HACKERS] s_lock.h busted