Slony-I 2.1.1 Documentation
Prev | Fast Backward | Chapter 8. Schema schemadoc | Fast Forward | Next

# 8.32. clonenodeprepare_int(p_no_comment integer, p_no_provider integer, p_no_id text)

Function Properties

Language: PLPGSQL

Return Type: integer

Internal part of cloneNodePrepare().

    begin
    	insert into sl_node
    		(no_id, no_active, no_comment)
    		select p_no_id, no_active, p_no_comment
    		from sl_node
    		where no_id = p_no_provider;

    	insert into sl_path
    		(pa_server, pa_client, pa_conninfo, pa_connretry)
    		select pa_server, p_no_id, 'Event pending', pa_connretry
    		from sl_path
    		where pa_client = p_no_provider;
    	insert into sl_path
    		(pa_server, pa_client, pa_conninfo, pa_connretry)
    		select p_no_id, pa_client, 'Event pending', pa_connretry
    		from sl_path
    		where pa_server = p_no_provider;

    	insert into sl_subscribe
    		(sub_set, sub_provider, sub_receiver, sub_forward, sub_active)
    		select sub_set, sub_provider, p_no_id, sub_forward, sub_active
    		from sl_subscribe
    		where sub_receiver = p_no_provider;

    	insert into sl_confirm
    		(con_origin, con_received, con_seqno, con_timestamp)
    		select con_origin, p_no_id, con_seqno, con_timestamp
    		from sl_confirm
    		where con_received = p_no_provider;

    	perform RebuildListenEntries();

    	return 0;
    end;

Prev | Home | Next
clonenodeprepare(p_no_comment integer, p_no_provider integer, p_no_id text) | Up | component_state(i_eventtype text, i_event integer, i_starttime integer, i_activity integer, i_conn_pid text, i_node timestamp with time zone, i_pid bigint, i_actor text)