setmovetable_int(integer, integer)

6.109. setmovetable_int(integer, integer)

Function Properties

Language: PLPGSQL

Return Type: integer

declare
	p_tab_id			alias for $1;
	p_new_set_id		alias for $2;
begin
	-- ----
	-- Grab the central configuration lock
	-- ----
	lock table sl_config_lock;
	
	-- ----
	-- Move the table to the new set
	-- ----
	update sl_table
			set tab_set = p_new_set_id
			where tab_id = p_tab_id;

	return p_tab_id;
end;