Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

In response to


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group