dropset(p_set_id integer)

8.62. dropset(p_set_id integer)

Function Properties

Language: PLPGSQL

Return Type: bigint

Process DROP_SET event to drop replication of set set_id. This involves: - Removing log and deny access triggers - Removing all traces of the set configuration, including sequences, tables, subscribers, syncs, and the set itself

	v_origin			int4;
	-- ----
	-- Check that the set exists and originates here
	-- ----
	select set_origin into v_origin from sl_set
			where set_id = p_set_id;
	if not found then
		raise exception 'Slony-I: set % not found', p_set_id;
	end if;
	if v_origin != getLocalNodeId('_schemadoc') then
		raise exception 'Slony-I: set % does not originate on local node',
	end if;

	-- ----
	-- Call the internal drop set functionality and generate the event
	-- ----
	perform dropSet_int(p_set_id);
	return  createEvent('_schemadoc', 'DROP_SET',