Browse Source

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.
merge-requests/85/head
Deimos 5 years ago
parent
commit
6211299b7b
  1. 2
      tildes/sql/init/functions/rabbitmq.sql

2
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;
Loading…
Cancel
Save