From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Idle idea for a feature |
Date: | 2007-04-10 14:48:11 |
Message-ID: | 20070410144810.GC31937@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> one). ISTM it'd be a good idea if it did, as "are there any incoming
> foreign keys" seems to be a question we constantly ask when solving
> update-performance problems, and there isn't any easy way to check for
> such. I'm not real sure what the printout should look like, though.
Agreed. Suggestion:
networx=> \d wdm_networx.loc_base_clin
Table "wdm_networx.loc_base_clin"
Column | Type | Modifiers
-------------+---------+-----------
btable_id | integer | not null
loc_base_id | integer | not null
clin | integer | not null
Indexes:
"loc_base_clin_pkey" PRIMARY KEY, btree (btable_id, loc_base_id, clin)
"btable_id_clin_unique" UNIQUE, btree (btable_id, clin)
Foreign-key constraints:
"loc_base_clin_btable_id_fkey" FOREIGN KEY (btable_id) REFERENCES wdm_networx.btables_ref(btable_id)
"loc_base_clin_clin_fkey" FOREIGN KEY (clin) REFERENCES wdm_networx.clin(clin)
"loc_base_clin_loc_base_id_fkey" FOREIGN KEY (loc_base_id) REFERENCES wdm_networx.loc_base_dscr(loc_base_id)
networx=> \d wdm_networx.loc_base_dscr
Table "wdm_networx.loc_base_dscr"
Column | Type | Modifiers
----------------+------------------------+-----------
loc_base_id | integer | not null
description | character varying(254) | not null
locations | character varying(254) |
univ_mandatory | character varying(254) |
ent_mandatory | character varying(254) |
Indexes:
"loc_base_dscr_pkey" PRIMARY KEY, btree (loc_base_id)
Referenced by:
"loc_base_clin_loc_base_id_fkey" FOREIGN KEY (loc_base_id) BY wdm_networx.loc_base_clin(loc_base_id)
/|\ /|\
Referenced column(s) in *this* table <----| |---> column(s) in referencing table
Just my 2c.
Thanks!
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2007-04-10 15:12:10 | Re: \da doesn't show result type |
Previous Message | Tom Lane | 2007-04-10 14:32:38 | Re: \da doesn't show result type |