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 BA0059DC800 for ; Thu, 16 Mar 2006 11:43:00 -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 32342-09 for ; Thu, 16 Mar 2006 11:43:05 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id A41FE9DC854 for ; Thu, 16 Mar 2006 11:42:58 -0400 (AST) Received: from ZAPPA.ic.aiall (mail.icrossing.com [65.218.233.130]) by svr4.postgresql.org (Postfix) with ESMTP id 760BA5AF980 for ; Thu, 16 Mar 2006 15:43:04 +0000 (GMT) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-7" Content-Transfer-Encoding: quoted-printable Subject: Re: schema inspection Date: Thu, 16 Mar 2006 08:43:00 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] schema inspection thread-index: AcZJD+lvhDcyCt3iQACeFm88oP4mGQAADbqQ From: "Michael James" To: "Achilleus Mantzios" , Cc: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200603/268 X-Sequence-Number: 24614 Pgadmin is a good GUI interface if you want that same info, but = pg_catalog is a better tool -----Original Message----- From: pgsql-sql-owner@postgresql.org = [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Achilleus Mantzios Sent: Thursday, March 16, 2006 9:45 AM To: rcolmegna@tiscali.it Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] schema inspection O rcolmegna@tiscali.it =DD=E3=F1=E1=F8=E5 =F3=F4=E9=F2 Mar 16, 2006 : > Hi, >=20 > supposing to have a small DB: >=20 > TABLE a ( > id SERIAL PRIMARY KEY > ); >=20 > TABLE b ( > id SERIAL PRIMARY KEY, > idA INTEGER NOT NULL REFERENCES a(id) > ); >=20 > How can I inspect pg_schema/information_schema to "detect" the=20 > relation between "b" and "a" via "idB"? >=20 pg_catalog.pg_constraint is your (only?) friend. > TIA > Roberto Colmegna >=20 >=20 >=20 >=20 > =09 > Tiscali ADSL 4 Mega Flat > Naviga senza limiti con l'unica Adsl a 4 Mega di velocit=C3=A0 a soli = 19,95 =E2?=AC al mese! > Attivala subito e hai GRATIS 2 MESI e l'ATTIVAZIONE.=20 > = http://abbonati.tiscali.it/banner/middlepagetracking.html?c=3Dwebmailadsl= &r=3Dhttp://abbonati.tiscali.it/adsl/sa/4flat_tc/&a=3Dwebmail&z=3Dwebmail= &t=3D14 >=20 > ---------------------------(end of = broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? >=20 > http://www.postgresql.org/docs/faq >=20 --=20 -Achilleus ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match iCrossing Privileged and Confidential Information This email message is for the sole use of the intended recipient(s) and = may contain confidential and privileged information of iCrossing. Any = unauthorized review, use, disclosure or distribution is prohibited. If = you are not the intended recipient, please contact the sender by reply = email and destroy all copies of the original message.