Index: openacs-4/packages/schema-browser/tcl/schema-browser-procs-postgresql.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/schema-browser/tcl/schema-browser-procs-postgresql.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/schema-browser/tcl/schema-browser-procs-postgresql.tcl 3 Jul 2002 08:30:12 -0000 1.2 +++ openacs-4/packages/schema-browser/tcl/schema-browser-procs-postgresql.tcl 10 Sep 2002 22:23:20 -0000 1.3 @@ -168,21 +168,20 @@ } ad_proc sb_get_foreign_keys { table_name } { + 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. - @author Don Baccus (though he hates to admit to writing such ugly code) + This code is *horribly* convoluted, mostly a result of the non-obvious way + that the needed information is organized in the PG system catalogs. - 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. + Feel free to clean this up if you want! - This code is *horribly* convoluted, mostly a result of the non-obvious way - that the needed information is organized in the PG system catalogs. + @author Don Baccus, though he hates to admit to writing such ugly code (dhogaza@pacifier.com) - Feel free to clean this up if you want! - } { set complex_foreign_keys [list] db_foreach schema_browser_get_referencess "