displaying constraints

From: Frank Joerdens <frank(at)joerdens(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: displaying constraints
Date: 2001-02-14 13:01:09
Message-ID: 20010214140109.A19494@rakete.joerdens.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

The only what that I am aware of in which you can display the
constraints that have been created for a table is by dumping out the
schema with the -s option and then trying to reconstruct the foreign key
references from the <unnamed> triggers which where created by the e.g.

some_column int4 references other_table ( other_column ),

statements in the queries which created the database or table. This is
considerably harder than just looking at the sql which created the
table, as I am just figuring out the hard way. I'll be recreating my
entire database from .sql files in order to have a proper documentation
as to the database structure. I'd rather not, but it seems just plain
too difficult to reconstruct everything that I did via alter table . . .
I am not really certain whether I can exactly reverse-engineer all the
foreign keys from the triggers.

Is there a better solution to my problem?

Cheers, Frank

Browse pgsql-sql by date

  From Date Subject
Next Message Dave Wedwick 2001-02-14 15:06:29 Re: Trigger question
Previous Message Jaros³aw B³¹d 2001-02-14 12:22:23 Re: binary operators