-- remove replication schema
DROP SCHEMA _replication CASCADE;
-
--- this should already be true, but explicitly setting the search path to include the evergreen schema:
-SELECT evergreen.change_db_setting('search_path', ARRAY['evergreen','public','pg_catalog']);
-
-- For preventing invalid marcxml - possible supplement or replacement for biblio.check_marcxml_well_formed?
-- Should be useful for flagging bad MARCXML that has slipped in over time
-- disable triggers on asset.copy
ALTER TABLE asset.copy DISABLE TRIGGER ALL;
-
--- go ahead and find problem records if any exist because we don't want them to interfere with progress
-\o /tmp/problem-bib-records.out
-SELECT id FROM biblio.record_entry WHERE is_valid_marcxml(id) IS FALSE;
-\o