Finding PrimaryKey columns of a table

From: swalker <swalker(at)iglou(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Finding PrimaryKey columns of a table
Date: 2000-05-02 16:26:23
Message-ID: Pine.LNX.4.21.0005021223280.12169-100000@ct36753-a.jfrvil1.in.home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a query I can run against the pg system tables to figure out what
columns of the table make up the primary key?

I've messed around w/ psql -E (which is very cool btw) and can't seem to
find the exact query I'm looking for. I can get all indexes for a table,
but I can't seem to limit the result set to only the primary key.

Am I missing something obvious ?

Thanks
Steve

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael S. Kelly 2000-05-02 16:34:59 RE: One last thing... psql and readline
Previous Message Bruce Momjian 2000-05-02 13:19:32 Re: postgresql7.0 jdbc driver