BEGIN; SELECT plan(3); ---------------------------------- -- Setup Test environment and data ---------------------------------- -- create bib 71,000 INSERT into biblio.record_entry (id, marc, last_xact_id) VALUES (71000, $$ 00934|jm a2200241 a 450003-000374519991118131708.0971016n nyuuuu eng 4539Bartók, Béla,1881-1945.Concertos,piano,no. 1,Sz. 83(1926) Concertos,piano,no. 1,Sz. 83,(1926)Piano concerto no. 1 (1926) ; Rhapsody, op. 1 (1904)New York, NY :Vox $$, 'PGTAP' ); ----------------------------------------- -- Test biblio.indexing_ingest_or_delete ----------------------------------------- -- initially record attributes should exist since the record is inserted SELECT is((SELECT EXISTS(SELECT 1 FROM metabib.record_attr WHERE id = 71000)), TRUE, 'Entries exist.'); -- check to see if record attributes are removed when the record is deleted UPDATE biblio.record_entry SET deleted = TRUE WHERE id = 71000; SELECT is((SELECT EXISTS(SELECT 1 FROM metabib.record_attr WHERE id = 71000)), FALSE, 'Entries should not exist.'); -- check to see if record attributes are restored when the record is undeleted UPDATE biblio.record_entry SET deleted = FALSE WHERE id = 71000; SELECT is((SELECT EXISTS(SELECT 1 FROM metabib.record_attr WHERE id = 71000)), TRUE, 'Entries exist.'); SELECT * FROM finish(); ROLLBACK;