From: | Reece Hart <reece(at)harts(dot)net> |
---|---|
To: | ashish_karalkar(at)yahoo(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Foreign Key Identification |
Date: | 2007-01-10 17:54:35 |
Message-ID: | 1168451675.6638.48.camel@snafu.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
From: Ashish Karalkar <ashish_karalkar ( at ) yahoo ( dot ) com>
* To: pgsql-general ( at ) postgresql ( dot ) org
* Subject: Foreign Key Identification
* Date: Wed, 10 Jan 2007 08:23:28 -0800 (PST)
________________________________________________________________
Hello All,
Is there any means to list out the foreign key tables
which are liked with a primary key?
What i want to do is something as follows:
...
select tablename from ? where Foreign key = TableAPK
and this should list me
I needed to do something similar. I wrote some views to do this and
packaged 'em up as something I call pgutils. See:
http://archives.postgresql.org/pgsql-general/2006-11/msg00752.php
http://harts.net/reece/pgutils/
-Reece
--
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0
./universe -G 6.672e-11 -e 1.602e-19 -protonmass 1.673e-27 -uspres bush
kernel warning: universe consuming too many resources. Killing.
universe killed due to catastrophic leadership. Try -uspres carter.
From | Date | Subject | |
---|---|---|---|
Next Message | Joris Dobbelsteen | 2007-01-10 18:26:36 | Re: Autovacuum Improvements |
Previous Message | Scott Marlowe | 2007-01-10 17:43:32 | Re: Advice needed on using postgres in commercial product |