Added catalog query for triggers

Minor fix on trigger code generation