From 6211299b7bda1ce8cc80e1f78cc8972e61cced27 Mon Sep 17 00:00:00 2001 From: Deimos Date: Tue, 22 Oct 2019 18:17:39 -0600 Subject: [PATCH] PostgreSQL: remove STABLE on send_rabbitmq_message I don't think this has ever affected anything, but this function shouldn't have been defined as STABLE. That enables the database to potentially optimize away some calls to it, and since this has side effects, we never want that to happen. Removing this defaults it back to classifying as VOLATILE, which is what we want. --- tildes/sql/init/functions/rabbitmq.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tildes/sql/init/functions/rabbitmq.sql b/tildes/sql/init/functions/rabbitmq.sql index 0284d6b..f671dac 100644 --- a/tildes/sql/init/functions/rabbitmq.sql +++ b/tildes/sql/init/functions/rabbitmq.sql @@ -3,4 +3,4 @@ CREATE OR REPLACE FUNCTION send_rabbitmq_message(routing_key TEXT, message TEXT) RETURNS VOID AS $$ SELECT pg_notify('pgsql_events', routing_key || '|' || message); -$$ STABLE LANGUAGE SQL; +$$ LANGUAGE SQL;