--
-- This file is part of TALER
-- Copyright (C) 2014--2026 Taler Systems SA
--
-- TALER is free software; you can redistribute it and/or modify it under the
-- terms of the GNU General Public License as published by the Free Software
-- Foundation; either version 3, or (at your option) any later version.
--
-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-- A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License along with
-- TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
--


DROP PROCEDURE IF EXISTS exchange_do_gc;
CREATE PROCEDURE exchange_do_gc(
  IN in_ancient_date INT8,
  IN in_now INT8)
LANGUAGE plpgsql
AS $$
BEGIN
  CALL exchange_do_main_gc(in_ancient_date,in_now);
  CALL exchange_statistic_amount_gc ();
  CALL exchange_statistic_bucket_gc ();
  CALL exchange_statistic_counter_gc ();
END $$;
COMMENT ON PROCEDURE exchange_do_gc
  IS 'calls all other garbage collection subroutines';

-- exchange_do_select_justification_missing_wire() is dead code.
DROP FUNCTION IF EXISTS exchange_do_select_justification_missing_wire;

COMMIT;
