do $$
begin
	if exists (select * from pg_proc where proname='sp_DeleteRegistredFiles')
	then
		DROP FUNCTION sp_DeleteRegistredFiles();
	end if;
end;
$$ LANGUAGE plpgsql;

-- =============================================
-- Author:      Vitacore (СЃ)
-- Create date: 2022-03-10
-- Description: Удаление всех незарегистрированных файлов
-- =============================================
CREATE or Replace Function sp_DeleteRegistredFiles()
RETURNS void As 
$$
BEGIN
	
	DELETE FROM VCLib.T_FILE_REGISTR;

END;
$$ Language plpgsql;
