From: dbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Wed, 30 Jun 2010 18:14:23 +0000 (+0000)
Subject: explode_array() is needed by 030.schema.metabib.sql now; create it early so that... 
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1282cd153e7427d0ff5dbb579a95c30216453b4d;p=contrib%2FConifer.git

explode_array() is needed by 030.schema.metabib.sql now; create it early so that database schema creation doesn't fail


git-svn-id: svn://svn.open-ils.org/ILS/trunk@16835 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/src/sql/Pg/002.functions.aggregate.sql b/Open-ILS/src/sql/Pg/002.functions.aggregate.sql
index 0463321c72..70dc588b13 100644
--- a/Open-ILS/src/sql/Pg/002.functions.aggregate.sql
+++ b/Open-ILS/src/sql/Pg/002.functions.aggregate.sql
@@ -84,4 +84,9 @@ CREATE AGGREGATE public.agg_tsvector (
 	stype	 = tsvector
 );
 
+CREATE OR REPLACE FUNCTION public.explode_array(anyarray) RETURNS SETOF anyelement AS $BODY$
+    SELECT ($1)[s] FROM generate_series(1, array_upper($1, 1)) AS s;
+$BODY$
+LANGUAGE 'sql' IMMUTABLE;
+
 COMMIT;
diff --git a/Open-ILS/src/sql/Pg/100.circ_matrix.sql b/Open-ILS/src/sql/Pg/100.circ_matrix.sql
index e3ed07f2d3..d786ce9c7c 100644
--- a/Open-ILS/src/sql/Pg/100.circ_matrix.sql
+++ b/Open-ILS/src/sql/Pg/100.circ_matrix.sql
@@ -1,11 +1,5 @@
 
 BEGIN;
-
-CREATE OR REPLACE FUNCTION explode_array(anyarray) RETURNS SETOF anyelement AS $BODY$
-    SELECT ($1)[s] FROM generate_series(1, array_upper($1, 1)) AS s;
-$BODY$
-LANGUAGE 'sql' IMMUTABLE;
-
 -- NOTE: current config.item_type should get sip2_media_type and magnetic_media columns
 
 -- New table needed to handle circ modifiers inside the DB.  Will still require