Re: Obtaining primary key information from pg system tables

From: "Dmitri Colebatch" <dim(at)bigpond(dot)net(dot)au>
To: "Kris" <krisallsop(at)btinternet(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Obtaining primary key information from pg system tables
Date: 2002-06-22 10:44:03
Message-ID: 006801c219d9$ba0b3710$fe00a8c0@hobbes
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Kris,

I'm assuming you dont want to do this, but just in case you're not aware of the option - the JDBC API exposes this information.

hth
dim
----- Original Message -----
From: Kris
To: pgsql-sql(at)postgresql(dot)org
Sent: Saturday, June 22, 2002 8:30 PM
Subject: [SQL] Obtaining primary key information from pg system tables

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Kris 2002-06-22 11:08:50 Re: Obtaining primary key information from pg system tables
Previous Message Vernon Wu 2002-06-22 10:36:18 A problem on running a sql script in DBVisualizer