unsubscribeset_int(p_sub_receiver integer, p_sub_set integer)

8.143. unsubscribeset_int(p_sub_receiver integer, p_sub_set integer)

Function Properties

Language: PLPGSQL

Return Type: integer

unsubscribeSet_int (sub_set, sub_receiver) All the REAL work of removing the subscriber is done before the event is generated, so this function just has to drop the references to the subscription in sl_subscribe.

begin
	-- ----
	-- All the real work is done before event generation on the
	-- subscriber.
	-- ----
	delete from sl_subscribe
			where sub_set = p_sub_set
				and sub_receiver = p_sub_receiver;

	-- Rewrite sl_listen table
	perform RebuildListenEntries();

	return p_sub_set;
end;