LP#1744385: Adjust function for a change in PLPgSQL in PG 9.4.16
authorMike Rylander <mrylander@gmail.com>
Thu, 22 Feb 2018 20:19:14 +0000 (15:19 -0500)
committerDan Wells <dbw2@calvin.edu>
Wed, 28 Feb 2018 21:19:43 +0000 (16:19 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/sql/Pg/300.schema.staged_search.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.highlight_search.sql

index 08ca281..e65df4a 100644 (file)
@@ -1432,7 +1432,7 @@ BEGIN
         tsq_hstore := tsq_map::HSTORE;
     END IF;
 
-    FOR tsq, fields IN SELECT key, value FROM each(tsq_hstore) LOOP
+    FOR tsq, fields IN SELECT key, value FROM each(tsq_hstore::HSTORE) LOOP
         SELECT  ARRAY_AGG(unnest::INT) INTO afields
           FROM  unnest(regexp_split_to_array(fields,','));
         seen := seen || afields;
index ed50842..e0a9193 100644 (file)
@@ -447,7 +447,7 @@ BEGIN
         tsq_hstore := tsq_map::HSTORE;
     END IF;
     
-    FOR tsq, fields IN SELECT key, value FROM each(tsq_hstore) LOOP
+    FOR tsq, fields IN SELECT key, value FROM each(tsq_hstore::HSTORE) LOOP
         SELECT  ARRAY_AGG(unnest::INT) INTO afields
           FROM  unnest(regexp_split_to_array(fields,','));
         seen := seen || afields;