pub struct Trigger {Show 18 fields
pub oid: u32,
pub relation: u32,
pub name: String,
pub function: u32,
pub kind: i16,
pub constraint_relation: u32,
pub constraint_index: u32,
pub constraint: u32,
pub deferrable: bool,
pub deferred: bool,
pub enabled: u8,
pub internal: bool,
pub args: Vec<String>,
pub columns: Vec<i16>,
pub old_table: Option<String>,
pub new_table: Option<String>,
pub qual: Option<String>,
pub parent: u32,
}Expand description
A trigger, one row of pg_trigger: a trigger of CREATE TRIGGER, or an internal trigger of a foreign key.
Fields§
§oid: u32The OID.
relation: u32The OID of the table of the trigger.
name: StringThe name.
function: u32The OID of the function.
kind: i16tgtype: the bits of the level, the time and the events.
constraint_relation: u32tgconstrrelid: the other table of the foreign key.
constraint_index: u32tgconstrindid: the unique index of the referenced table.
constraint: u32tgconstraint: the OID of the foreign key.
deferrable: booltgdeferrable.
deferred: booltginitdeferred.
enabled: u8tgenabled: O when the trigger fires in the origin mode, D when it is disabled, R when it fires only in the replica mode, and A when it always fires.
internal: booltgisinternal: true for a trigger of a foreign key.
args: Vec<String>tgargs: the arguments of the function, as text.
columns: Vec<i16>tgattr: the numbers of the columns of UPDATE OF, in the order of the statement.
old_table: Option<String>tgoldtable: the name of the transition table of REFERENCING OLD TABLE.
new_table: Option<String>tgnewtable: the name of the transition table of REFERENCING NEW TABLE.
qual: Option<String>tgqual: the stored form of the condition of WHEN, in which the relation 0 is old and the relation 1 is new.
parent: u32tgparentid: the trigger of the parent table that the trigger of a partition is a clone of, or 0.