1.127. uninstallnode( )

Function Properties

Language: PLPGSQL

Return Type: integer

Reset the whole database to standalone by removing the whole replication system.

declare
	v_tab_row		record;
begin
	-- ----
	-- Grab the central configuration lock
	-- ----
	lock table sl_config_lock;

	-- ----
	-- This is us ... time for suicide! Restore all tables to
	-- their original status.
	-- ----
	for v_tab_row in select * from sl_table loop
		perform alterTableRestore(v_tab_row.tab_id);
		perform tableDropKey(v_tab_row.tab_id);
	end loop;

	raise notice 'Slony-I: Please drop schema "_schemadoc"';
	return 0;
end;