Received: from rakete.joerdens.de (rakete.joerdens.de [62.104.116.200]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1ECuWx25776 for ; Wed, 14 Feb 2001 07:56:33 -0500 (EST) (envelope-from frank@rakete.joerdens.de) Received: (from frank@localhost) by rakete.joerdens.de (8.9.3/8.9.3) id OAA19692 for pgsql-sql@postgresql.org; Wed, 14 Feb 2001 14:01:09 +0100 Date: Wed, 14 Feb 2001 14:01:09 +0100 From: Frank Joerdens To: pgsql-sql@postgresql.org Subject: displaying constraints Message-ID: <20010214140109.A19494@rakete.joerdens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i X-Subliminal-Message: Use Linux! Use Linux! X-Archive-Number: 200102/254 X-Sequence-Number: 1445 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 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