pub struct PgTrigger {Show 21 fields
pub tgrelid: SmolStr,
pub tgparentid: Option<SmolStr>,
pub tgname: SmolStr,
pub tgfoid: SmolStr,
pub tgtype: i16,
pub tgenabled: PgTriggerTgenabled,
pub tgisinternal: bool,
pub tgconstrrelid: Option<SmolStr>,
pub tgconstrindid: Option<SmolStr>,
pub tgconstraint: Option<SmolStr>,
pub tgdeferrable: bool,
pub tginitdeferred: bool,
pub tgnargs: u16,
pub tgattr: Vec<u16>,
pub tgargs: Vec<u8>,
pub tgqual: Option<SmolStr>,
pub tgoldtable: Option<SmolStr>,
pub tgnewtable: Option<SmolStr>,
pub description: Option<SmolStr>,
pub seclabel: Option<SmolStr>,
pub seclabel_provider: Option<SmolStr>,
}Expand description
The DDL-only contents of pg_trigger
Fields§
§tgrelid: SmolStroid (references pg_class.oid) The table this trigger is on
tgparentid: Option<SmolStr>oid (references pg_trigger.oid) Parent trigger that this trigger is cloned from (this happens when partitions are created or attached to a partitioned table); zero if not a clone
tgname: SmolStrname Trigger name (must be unique among triggers of same table)
tgfoid: SmolStroid (references pg_proc.oid) The function to be called
tgtype: i16int2 Bit mask identifying trigger firing conditions
tgenabled: PgTriggerTgenabledchar Controls in which session_replication_role modes the trigger fires. O = trigger fires in “origin” and “local” modes, D = trigger is disabled, R = trigger fires in “replica” mode, A = trigger fires always.
tgisinternal: boolbool True if trigger is internally generated (usually, to enforce the constraint identified by tgconstraint)
tgconstrrelid: Option<SmolStr>oid (references pg_class.oid) The table referenced by a referential integrity constraint (zero if trigger is not for a referential integrity constraint)
tgconstrindid: Option<SmolStr>oid (references pg_class.oid) The index supporting a unique, primary key, referential integrity, or exclusion constraint (zero if trigger is not for one of these types of constraint)
tgconstraint: Option<SmolStr>oid (references pg_constraint.oid) The pg_constraint entry associated with the trigger (zero if trigger is not for a constraint)
tgdeferrable: boolbool True if constraint trigger is deferrable
tginitdeferred: boolbool True if constraint trigger is initially deferred
tgnargs: u16int2 Number of argument strings passed to trigger function
tgattr: Vec<u16>int2vector (references pg_attribute.attnum) Column numbers, if trigger is column-specific; otherwise an empty array
tgargs: Vec<u8>bytea Argument strings to pass to trigger, each NULL-terminated
tgqual: Option<SmolStr>pg_node_tree Expression tree (in nodeToString() representation) for the trigger’s WHEN condition, or null if none
tgoldtable: Option<SmolStr>name REFERENCING clause name for OLD TABLE, or null if none
tgnewtable: Option<SmolStr>name REFERENCING clause name for NEW TABLE, or null if none
description: Option<SmolStr>text The comment from pg_description
seclabel: Option<SmolStr>text The seclabel from pg_seclabel
seclabel_provider: Option<SmolStr>text The provider from pg_seclabel
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PgTrigger
impl<'de> Deserialize<'de> for PgTrigger
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PgTrigger, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PgTrigger, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for PgTrigger
impl Serialize for PgTrigger
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for PgTrigger
impl StructuralPartialEq for PgTrigger
Auto Trait Implementations§
impl Freeze for PgTrigger
impl RefUnwindSafe for PgTrigger
impl Send for PgTrigger
impl Sync for PgTrigger
impl Unpin for PgTrigger
impl UnsafeUnpin for PgTrigger
impl UnwindSafe for PgTrigger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.