Untitled
unknown
plain_text
2 years ago
487 B
34
Indexable
CREATE OR REPLACE FUNCTION public.simple_trigger_test() RETURNS TRIGGER AS $$
BEGIN
INSERT INTO public.debug_log(message) VALUES ('Simple trigger test executed.');
RETURN NEW;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;
-- Make sure to drop the existing trigger before creating a new one
DROP TRIGGER IF EXISTS simple_test_trigger ON stripe.invoices;
CREATE TRIGGER simple_test_trigger
AFTER INSERT ON stripe.invoices
FOR EACH ROW
EXECUTE FUNCTION public.simple_trigger_test();
Editor is loading...
Leave a Comment