fix getTriggers for now working args display code
authorchriskl <chriskl>
Tue, 20 May 2003 05:43:46 +0000 (05:43 +0000)
committerchriskl <chriskl>
Tue, 20 May 2003 05:43:46 +0000 (05:43 +0000)
classes/database/Postgres71.php
classes/database/Postgres73.php

index 8843e3d749760b5a75fc929fea29615e28676aa7..1d677f1cba04a9738000103f7838622070b09a48 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres71.php,v 1.34 2003/05/18 12:48:11 chriskl Exp $
+ * $Id: Postgres71.php,v 1.35 2003/05/20 05:43:46 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -281,7 +281,9 @@ class Postgres71 extends Postgres {
 
                // We include constraint triggers
                $sql = "SELECT t.tgname, t.tgisconstraint, t.tgdeferrable, t.tginitdeferred, t.tgtype, 
-                       t.tgargs, t.tgnargs, t.tgconstrrelid, p.proname AS tgfname, c.relname, NULL AS tgdef
+                       t.tgargs, t.tgnargs, t.tgconstrrelid, 
+                       (SELECT relname FROM pg_class c2 WHERE c2.oid=t.tgconstrrelid) AS tgconstrrelname,
+                       p.proname AS tgfname, c.relname, NULL AS tgdef
                        FROM pg_trigger t LEFT JOIN pg_proc p
                        ON t.tgfoid=p.oid, pg_class c
                        WHERE t.tgrelid=c.oid
index b3b5482040cf78c7e7e3cfa0c11d01d1868f563f..d0cdbe3d5d083e1d65cf82fac2a0ebba6ae8f54c 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres73.php,v 1.45 2003/05/15 14:34:47 chriskl Exp $
+ * $Id: Postgres73.php,v 1.46 2003/05/20 05:43:47 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -442,7 +442,9 @@ class Postgres73 extends Postgres72 {
                $this->clean($table);
 
                $sql = "SELECT t.tgname, t.tgisconstraint, t.tgdeferrable, t.tginitdeferred, t.tgtype, 
-                       t.tgargs, t.tgnargs, p.proname AS tgfname, c.relname, NULL AS tgdef
+                       t.tgargs, t.tgnargs, t.tgconstrrelid, 
+                       (SELECT relname FROM pg_catalog.pg_class c2 WHERE c2.oid=t.tgconstrrelid) AS tgconstrrelname,
+                       p.proname AS tgfname, c.relname, NULL AS tgdef
                        FROM pg_catalog.pg_trigger t LEFT JOIN pg_catalog.pg_proc p
                        ON t.tgfoid=p.oid, pg_catalog.pg_class c
                        WHERE t.tgrelid=c.oid