Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 702C24758FE for ; Mon, 25 Nov 2002 13:32:21 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id A11D1474E5C for ; Mon, 25 Nov 2002 13:32:16 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id gAPIW5sX008775; Mon, 25 Nov 2002 13:32:05 -0500 (EST) To: Tilo Schwarz Cc: pgsql-sql@postgresql.org Subject: Re: Question on SQL and pg_-tables In-reply-to: <200211251721.27543.mail@tilo-schwarz.de> References: <200211251721.27543.mail@tilo-schwarz.de> Comments: In-reply-to Tilo Schwarz message dated "Mon, 25 Nov 2002 17:21:27 +0100" Date: Mon, 25 Nov 2002 13:32:05 -0500 Message-ID: <8774.1038249125@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/353 X-Sequence-Number: 10495 Tilo Schwarz writes: > - Is it possible to get not only the two tables, but also their corresponding > two columns involved in a RI-Constraint out of the pg_* tables just with a > SQL query? Not easily --- the column info is buried in the pg_trigger.tgargs entries for the RI triggers, which there is no good way to take apart in plain SQL. You might care to start experimenting with 7.3 instead; the new pg_constraint table makes this much easier. regards, tom lane