BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0726', :eg_version); -- denials
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0727', :eg_version); -- denials/mrpeters
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
--- /dev/null
+-- Evergreen DB patch 0727.function.xml_pretty_print.sql
+--
+-- A simple pretty printer for XML.
+-- Particularly useful for debugging the biblio.record_entry.marc field.
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0727', :eg_version);
+
+CREATE OR REPLACE FUNCTION evergreen.xml_pretty_print(input XML)
+ RETURNS XML
+ LANGUAGE SQL AS
+$func$
+SELECT xslt_process($1::text,
+$$<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+ <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
+ <xsl:strip-space elements="*"/>
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+ </xsl:stylesheet>
+$$::text)::XML
+$func$;
+
+COMMENT ON FUNCTION evergreen.xml_pretty_print(input XML) IS
+'Simple pretty printer for XML, as written by Andrew Dunstan at http://goo.gl/zBHIk';
+
+COMMIT;
+++ /dev/null
-CREATE OR REPLACE FUNCTION evergreen.xml_pretty_print(input XML)
- RETURNS XML
- LANGUAGE SQL AS
-$func$
-SELECT xslt_process($1::text,
-$$<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
- <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
- <xsl:strip-space elements="*"/>
- <xsl:template match="@*|node()">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
-$$::text)::XML
-$func$;
-
-COMMENT ON FUNCTION evergreen.xml_pretty_print(input XML) IS
-'Simple pretty printer for XML, as written by Andrew Dunstan at http://goo.gl/zBHIk';
-