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

# 8.78. mergeset_int(p_add_id integer, p_set_id integer)

Function Properties

Language: PLPGSQL

Return Type: integer

mergeSet_int(set_id, add_id) - Perform MERGE_SET event, merging all objects from set add_id into set set_id.

    begin
    	-- ----
    	-- Grab the central configuration lock
    	-- ----
    	lock table sl_config_lock;

    	update sl_sequence
    			set seq_set = p_set_id
    			where seq_set = p_add_id;
    	update sl_table
    			set tab_set = p_set_id
    			where tab_set = p_add_id;
    	delete from sl_subscribe
    			where sub_set = p_add_id;
    	delete from sl_setsync
    			where ssy_setid = p_add_id;
    	delete from sl_set
    			where set_id = p_add_id;

    	return p_set_id;
    end;

Prev | Home | Next
mergeset(p_add_id integer, p_set_id integer) | Up | moveset(p_new_origin integer, p_set_id integer)