Obtaining primary key information from pg system tables

From: "Kris" <krisallsop(at)btinternet(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Obtaining primary key information from pg system tables
Date: 2002-06-22 10:30:04
Message-ID: 009201c219d7$c6605420$30267bd5@graveland
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Vernon Wu 2002-06-22 10:36:18 A problem on running a sql script in DBVisualizer
Previous Message Andrew Hammond 2002-06-21 21:34:59 Re: is it easy to change the create sequence algorithm?