pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dmitri Colebatch <dim@bigpond.net.au>
To: Kris <krisallsop@btinternet.com>
To: pgsql-sql@postgresql.org
Subject: Re: Obtaining primary key information from pg system tables
Date: Sat, 22 Jun 2002 20:44:03 +1000
Message-ID: <006801c219d9$ba0b3710$fe00a8c0@hobbes> (raw)
References: <009201c219d7$c6605420$30267bd5@graveland>

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@postgresql.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

view thread (3+ messages)  latest in thread

Message-ID: <006801c219d9$ba0b3710$fe00a8c0@hobbes>
Permalink:  ../006801c219d9$ba0b3710$fe00a8c0@hobbes/
Also on:    postgresql.org/message-id/006801c219d9$ba0b3710$fe00a8c0@hobbes

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dim@bigpond.net.au, krisallsop@btinternet.com
  Subject: Re: Obtaining primary key information from pg system tables
  In-Reply-To: <006801c219d9$ba0b3710$fe00a8c0@hobbes>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox