[open-ils-commits] r18435 - trunk/Open-ILS/src/sql/Pg/upgrade (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Oct 21 10:45:15 EDT 2010


Author: gmc
Date: 2010-10-21 10:45:13 -0400 (Thu, 21 Oct 2010)
New Revision: 18435

Added:
   trunk/Open-ILS/src/sql/Pg/upgrade/0444.schema.upper-bytea.sql
Log:
adding database update missed in previous commit

Signed-off-by: Galen Charlton <gmc at esilibrary.com>


Added: trunk/Open-ILS/src/sql/Pg/upgrade/0444.schema.upper-bytea.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0444.schema.upper-bytea.sql	                        (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0444.schema.upper-bytea.sql	2010-10-21 14:45:13 UTC (rev 18435)
@@ -0,0 +1,13 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0444'); -- gmc
+
+CREATE OR REPLACE FUNCTION oils_text_as_bytea (TEXT) RETURNS BYTEA AS $_$
+    SELECT CAST(REGEXP_REPLACE(UPPER($1), $$\\$$, $$\\\\$$, 'g') AS BYTEA);
+$_$ LANGUAGE SQL IMMUTABLE;
+
+DROP INDEX asset.asset_call_number_upper_label_id_owning_lib_idx;
+CREATE INDEX asset_call_number_upper_label_id_owning_lib_idx ON asset.call_number (oils_text_as_bytea(label),id,owning_lib);
+
+COMMIT;
+



More information about the open-ils-commits mailing list