pub fn user_trigger_infos(
schema: &SchemaDescriptor,
) -> Result<Vec<DeletionTriggerInfo>, PyQLError>Expand description
One CREATE FUNCTION + CREATE TRIGGER pair per user-declared schema
Trigger. Public entry point for diff/mod.rs, mirroring
deletion_policy_trigger_infos/signal_trigger_infos — the single
source of truth both export_schema and migration-diff drift detection
consult, so they can’t drift apart the way cache/signal triggers once
did (see diff::expected_triggers’s own doc comment).
Every statement query::compile produces ends in a RETURNING (...) AS result (or is a bare SELECT) — required so a normal PyQL caller can
decode a result row, but it means plpgsql refuses to run it as a bare
statement (“query has no destination for result data”). The generated
function declares a throwaway record local and appends INTO _pylon_trigger_result to swallow it — a non-STRICT INTO is fine
with any row count (0, 1, or many), matching “fire and forget” exactly.