RETURN heading_text;
END;
-$func$ LANGUAGE PLPGSQL IMMUTABLE;
+$func$ LANGUAGE PLPGSQL STABLE STRICT;
CREATE TABLE authority.simple_heading (
id BIGSERIAL PRIMARY KEY,
RETURN;
END;
-$func$ LANGUAGE PLPGSQL IMMUTABLE;
+$func$ LANGUAGE PLPGSQL STABLE STRICT;
CREATE OR REPLACE FUNCTION authority.simple_normalize_heading( marcxml TEXT ) RETURNS TEXT AS $func$
SELECT authority.normalize_heading($1, TRUE);
-$func$ LANGUAGE SQL IMMUTABLE;
+$func$ LANGUAGE SQL STABLE STRICT;
CREATE OR REPLACE FUNCTION authority.normalize_heading( marcxml TEXT ) RETURNS TEXT AS $func$
SELECT authority.normalize_heading($1, FALSE);
-$func$ LANGUAGE SQL IMMUTABLE;
+$func$ LANGUAGE SQL STABLE STRICT;
COMMENT ON FUNCTION authority.normalize_heading( TEXT ) IS $$
Extract the authority heading, thesaurus, and NACO-normalized values
BEGIN;
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
ALTER TABLE authority.record_entry ADD COLUMN heading TEXT, ADD COLUMN simple_heading TEXT;
CREATE TRIGGER update_headings_tgr BEFORE INSERT OR UPDATE ON authority.record_entry FOR EACH ROW EXECUTE PROCEDURE authority.normalize_heading_for_upsert();
+ALTER FUNCTION authority.normalize_heading(TEXT, BOOL) STABLE STRICT;
+ALTER FUNCTION authority.normalize_heading(TEXT) STABLE STRICT;
+ALTER FUNCTION authority.simple_normalize_heading(TEXT) STABLE STRICT;
+ALTER FUNCTION authority.simple_heading_set(TEXT) STABLE STRICT;
+
COMMIT;
ALTER TABLE authority.record_entry ENABLE TRIGGER a_marcxml_is_well_formed;