## 1.70. rebuildlistenentries( )

Function Properties
Language: PLPGSQL
Return Type: integer

RebuildListenEntries(p_provider, p_receiver) Invoked by various subscription and path modifying functions, this rewrites the sl_listen entries, adding in all the ones required to allow communications between nodes in the Slony-I cluster.

    declare
    	v_row			record;
    begin
    	-- First remove the entire configuration
    	delete from sl_listen;

    	-- The loop over every possible pair of origin, receiver
    	for v_row in select N1.no_id as origin, N2.no_id as receiver
    			from sl_node N1, sl_node N2
    			where N1.no_id <> N2.no_id
    	loop
    		perform RebuildListenEntriesOne(v_row.origin, v_row.receiver);
    	end loop;

    	return 0;
    end;