Fixes issue 21655: The alert to check disabled triggers does not work
authorJavier Etxarri <javier.echarri@openbravo.com>
Tue, 18 Sep 2012 15:22:53 +0200
changeset 17973 861d5861059e
parent 17972 4e6bdb057dbd
child 17974 292bdf82cd53
Fixes issue 21655: The alert to check disabled triggers does not work
src-db/database/model/prescript-PostgreSql.sql
--- a/src-db/database/model/prescript-PostgreSql.sql	Fri Sep 14 14:21:28 2012 +0200
+++ b/src-db/database/model/prescript-PostgreSql.sql	Tue Sep 18 15:22:53 2012 +0200
@@ -1292,7 +1292,7 @@
 CREATE OR REPLACE VIEW USER_TRIGGERS
 (TABLE_NAME, TABLESPACE_NAME, TRIGGER_NAME, STATUS)
 AS 
-SELECT UPPER(PG_CLASS.RELNAME), UPPER(PG_NAMESPACE.NSPNAME), PG_TRIGGER.TGNAME, 'ENABLED'::text
+SELECT UPPER(PG_CLASS.RELNAME), UPPER(PG_NAMESPACE.NSPNAME), PG_TRIGGER.TGNAME, CASE WHEN pg_trigger.tgenabled = 'D'::"char" THEN 'DISABLED'::text ELSE 'ENABLED'::text END AS status
 FROM PG_TRIGGER, PG_CLASS, PG_NAMESPACE
 WHERE PG_TRIGGER.tgrelid = PG_CLASS.OID
 AND PG_CLASS.RELNAMESPACE = PG_NAMESPACE.OID