do $$
declare _ClientModuleID uuid;
begin
	_ClientModuleID := (select ClientModuleID from VCLib.T_CLIENT_MODULES cm where cm.Schema = 'RDS' and cm.ModuleType = 'RDSClientCommandUIHandler');

	delete from VCLib.T_NEWS_BOX_LINK_MODULE where ClientModules = _ClientModuleID;
	delete from VCLib.T_ADD_DOCUMENT_LINK_MODULE where ClientModules = _ClientModuleID;
	delete from VCLib.T_ROLE_CLIENT_MODULES where ClientModuleID = _ClientModuleID;
	delete from VCLib.T_CLIENT_MODULES where ClientModuleID = _ClientModuleID;
end;
$$ language plpgsql;