diff options
Diffstat (limited to 'src/auditordb/0002-auditor-triggers.sql')
-rw-r--r-- | src/auditordb/0002-auditor-triggers.sql | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/auditordb/0002-auditor-triggers.sql b/src/auditordb/0002-auditor-triggers.sql index 43d8eb8f6..ce4b66b7b 100644 --- a/src/auditordb/0002-auditor-triggers.sql +++ b/src/auditordb/0002-auditor-triggers.sql @@ -1,19 +1,20 @@ SET search_path TO auditor; -CREATE TRIGGER auditor_notify_helper_deposits - AFTER INSERT - ON auditor.deposit_confirmations -EXECUTE PROCEDURE auditor_new_transactions_trigger(); - CREATE OR REPLACE FUNCTION auditor_new_transactions_trigger() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN -- TODO Add correct notify string - PERFORM('NOTIFY XRE2709K6TYDBVARD9Y5SCZY7VHE4D5DKF0R8DHQ4X5T13E8X2X60'); + NOTIFY XRE2709K6TYDBVARD9Y5SCZY7VHE4D5DKF0R8DHQ4X5T13E8X2X60; RETURN NEW; END $$; COMMENT ON FUNCTION auditor_new_transactions_trigger() IS 'Call auditor_call_db_notify on new entry'; + +CREATE TRIGGER auditor_notify_helper_deposits + AFTER INSERT + ON auditor.deposit_confirmations +EXECUTE PROCEDURE auditor_new_transactions_trigger(); + |