Obtaining primary key information from the system tables - Mailing list pgsql-general

From Kris
Subject Obtaining primary key information from the system tables
Date
Msg-id 008901c219d7$9002a270$30267bd5@graveland
Whole thread Raw
List pgsql-general
Hi,
 
I am trying to generate some xml metadata from the pg system tables for my java code generation utility. I have can get most information, but i would like to be able to tell which column is a primary key or which one is a foreign key (i dont need to know which table the foreign key references at this point).
 
Which tables do i need reference, could anyone provide an example query?
 
Kris

pgsql-general by date:

Previous
From: Varun Kacholia
Date:
Subject: COPY problem
Next
From: Curt Sampson
Date:
Subject: Re: read this and puke