Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8BAD4650E23 for ; Fri, 4 Jul 2008 11:43:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 11129-01 for ; Fri, 4 Jul 2008 11:43:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by postgresql.org (Postfix) with ESMTP id 1C958650ECD for ; Fri, 4 Jul 2008 11:43:51 -0300 (ADT) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id m64EhnXV090751 for ; Fri, 4 Jul 2008 17:43:49 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id m64EhnqU090750 for pgsql-admin@postgresql.org; Fri, 4 Jul 2008 17:43:49 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-admin@postgresql.org Subject: Re: how to get fy info from the parent table Date: Fri, 4 Jul 2008 17:43:48 +0300 User-Agent: KMail/1.9.7 References: <191205.16325.qm@web56414.mail.re3.yahoo.com> In-Reply-To: <191205.16325.qm@web56414.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200807041743.48920.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/68 X-Sequence-Number: 29678 =CE=A3=CF=84=CE=B9=CF=82 Friday 04 July 2008 16:57:20 =CE=BF/=CE=B7 Jessica= Richard =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > Could some one tell me how to check this pk/fy thing please? > smth like=20 SELECT kid.relname as "KID",c.confrelid,c.conkey,c.confkey,f.relname as "DA= D"=20 =46ROM pg_catalog.pg_constraint c,pg_catalog.pg_class f,pg_catalog.pg_class= kid WHERE=20 c.contype =3D 'f' AND c.confrelid =3D f.oid AND c.conrelid=3Dkid.oid AND f.= relname=3D'vessels'; could be your friend. substitute vessels with your "DAD" table, to find the= kids. =20 > >From the parent table, I can see only the primary key there, now I wan t= o know how many and what other foreign keys are referencing this primary ke= y... did this check long time ago and totally forgot how I did it then.... >=20 > Thanks a log, > Jessica >=20 >=20 >=20 > =20 =2D-=20 Achilleas Mantzios