Configures Postgres triggers and database webhooks for event-driven architectures in Supabase.
97
97%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Critical
Do not install without reviewing
supabase-mcp-verification passing first. HALT otherwise.AFTER UPDATE trigger without an OF <column_list> clause. Unscoped UPDATE triggers fire on every column change and cause unnecessary HTTP callouts. HALT if column list is missing.row_to_json(*) or manual JSON construction. MUST use row_to_json(NEW) or row_to_json(OLD) exclusively for payload serialization.current_setting('app.settings.<key>') or Supabase Vault.pg_catalog schemas.BEFORE triggers for webhook callouts. Webhooks MUST fire as AFTER triggers to ensure the transaction has committed.pg_net extension (net.http_post()) for all HTTP callouts. NEVER use pg_cron, dblink, or external scripts for webhook delivery.execute_sql for all DDL operations. NEVER use direct psql or ORM migrations.Content-Type: application/json header on every HTTP callout.information_schema.triggers after creation.pg_proc after creation.trg_<table>_<event>_webhook (e.g., trg_orders_insert_webhook).fn_<table>_<event>_webhook (e.g., fn_orders_insert_webhook).CREATE OR REPLACE FUNCTION to allow idempotent re-runs.