sb_get_foreign_keys (public)

 sb_get_foreign_keys table_name

Defined in packages/schema-browser/tcl/schema-browser-procs-postgresql.tcl

Build a list describing all foreign keys on table_name and their actions. We ignore MATCH conditions because Oracle doesn't support them, therefore, OpenACS doesn't use them. Same is true of SET NULL and SET DEFAULT actions hung on ON DELETE/ON UPDATE subclauses, but since Oracle *does* support CASCADE as an action I had figure out how to grab this info from the system catalog anyway. This code is *horribly* convoluted, mostly a result of the non-obvious way that the needed information is organized in the PG system catalogs. g Feel free to clean this up if you want!

Parameters:
table_name
Author:
Don Baccus, though he hates to admit to writing such ugly code <dhogaza@pacifier.com>

Partial Call Graph (max 5 caller/called nodes):
%3 sb_get_table_description sb_get_table_description (public) sb_get_foreign_keys sb_get_foreign_keys sb_get_table_description->sb_get_foreign_keys db_foreach db_foreach (public) sb_get_foreign_keys->db_foreach

Testcases:
No testcase defined.
[ show source ]
Show another procedure: