CREATE TABLE marcxml_import (marc TEXT);
+/**
+ * create a callnumber for every bib record in the database,
+ * appending the bib ID to the callnumber label to differentiate.
+ */
CREATE FUNCTION evergreen.populate_call_number (ownlib INTEGER, label TEXT)
RETURNS void AS $$
INSERT INTO asset.call_number (record, creator, editor, owning_lib, label, label_class)
WHERE id > 0;
$$ LANGUAGE SQL;
+/*
+ * create a copy for every callnumber in the database whose label and owninb_lib
+ * matches, appending the callnumber ID to the copy barcode to differentate.
+ */
CREATE FUNCTION evergreen.populate_copy (circlib INTEGER, ownlib INTEGER, barcode TEXT, label TEXT)
RETURNS void AS $$
INSERT INTO asset.copy (call_number, circ_lib, creator, editor, loan_duration, fine_level, barcode)