X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D2E329DC94A for ; Thu, 16 Mar 2006 11:39:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32922-03 for ; Thu, 16 Mar 2006 11:39:39 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from matrix.gatewaynet.com (host2.dynacom.ondsl.gr [62.103.35.210]) by postgresql.org (Postfix) with ESMTP id BB3789DC843 for ; Thu, 16 Mar 2006 11:39:30 -0400 (AST) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id k2GGjKOp024210; Thu, 16 Mar 2006 18:45:20 +0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id k2GGjKPX024206; Thu, 16 Mar 2006 18:45:20 +0200 Date: Thu, 16 Mar 2006 18:45:20 +0200 (EET) From: Achilleus Mantzios To: "rcolmegna@tiscali.it" cc: pgsql-sql@postgresql.org Subject: Re: schema inspection In-Reply-To: <9099192.1142520951367.JavaMail.root@ps10> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.111 required=5 tests=[AWL=0.111] X-Spam-Score: 0.111 X-Spam-Level: X-Archive-Number: 200603/230 X-Sequence-Number: 24576 O rcolmegna@tiscali.it Ýãñáøå óôéò Mar 16, 2006 : > Hi, > > supposing to have a small DB: > > TABLE a ( > id SERIAL PRIMARY KEY > ); > > TABLE b ( > id SERIAL PRIMARY KEY, > idA INTEGER NOT NULL REFERENCES a(id) > ); > > How can I inspect pg_schema/information_schema to "detect" the > relation between "b" and "a" via "idB"? > pg_catalog.pg_constraint is your (only?) friend. > TIA > Roberto Colmegna > > > > > > Tiscali ADSL 4 Mega Flat > Naviga senza limiti con l'unica Adsl a 4 Mega di velocità a soli 19,95 € al mese! > Attivala subito e hai GRATIS 2 MESI e l'ATTIVAZIONE. > http://abbonati.tiscali.it/banner/middlepagetracking.html?c=webmailadsl&r=http://abbonati.tiscali.it/adsl/sa/4flat_tc/&a=webmail&z=webmail&t=14 > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > -- -Achilleus