SQL Query to get Column constraints

From: "Steve" <svanspal(at)bigpond(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: SQL Query to get Column constraints
Date: 2003-03-30 01:09:00
Message-ID: Msrha.2149$ft3.12066@news-server.bigpond.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi there,

I have been through the postgres faq's, and read through the describe.c
file.

I can't seem to solve my problem.

I am building an automatic file writer, that gives me information about each
of my tables.

What I need to know, is how to find out if a column is a primary, or part of
a primary key. I need to do this using sql.

I am used to oracle, whose structure is different. Can anyone help me.

Whiel I am at it, If I can dynamically find out if a column has a sequence
attached to it, that would also be useful.

Regards

Steve

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-30 02:22:09 Re: Changing behavior of BEGIN...sleep...do something...COMMIT
Previous Message Doug McNaught 2003-03-29 23:40:52 Re: Changing behavior of BEGIN...sleep...do something...COMMIT