Obtaining primary key information from the system tables

From: "Kris" <krisallsop(at)btinternet(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Obtaining primary key information from the system tables
Date: 2002-06-22 10:28:33
Message-ID: 008901c219d7$9002a270$30267bd5@graveland
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Curt Sampson 2002-06-22 10:44:11 Re: read this and puke
Previous Message Varun Kacholia 2002-06-22 09:47:24 COPY problem