From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: rcolmegna@tiscali.it <rcolmegna@tiscali.it>
Cc: pgsql-sql@postgresql.org
Subject: Re: schema inspection
Date: Thu, 16 Mar 2006 18:45:20 +0200 (EET)
Message-ID: <Pine.LNX.4.44.0603161844490.24076-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <9099192.1142520951367.JavaMail.root@ps10>
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.tiscal...
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
--
-Achilleus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: achill@matrix.gatewaynet.com, rcolmegna@tiscali.it
Subject: Re: schema inspection
In-Reply-To: <Pine.LNX.4.44.0603161844490.24076-100000@matrix.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox