[open-ils-commits] r18343 - in trunk/Open-ILS/src: perlmods/OpenILS/Application/Storage/Publisher sql/Pg sql/Pg/upgrade (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Oct 14 16:04:10 EDT 2010


Author: miker
Date: 2010-10-14 16:04:05 -0400 (Thu, 14 Oct 2010)
New Revision: 18343

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/asset.pm
   trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql
   trunk/Open-ILS/src/sql/Pg/upgrade/0438.schema.bytea-index-label.sql
Log:
"as" not "to" ... you pointed that out the first time, miker, what is your deal?

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/asset.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/asset.pm	2010-10-14 19:57:42 UTC (rev 18342)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/asset.pm	2010-10-14 20:04:05 UTC (rev 18343)
@@ -230,9 +230,9 @@
 		        $table cn
 		where
 			not deleted
-		        and (cast(upper(label) to bytea) > ? or ( cn.id > ? and cast(upper(label) to bytea) = ? ))
+		        and (cast(upper(label) as bytea) > ? or ( cn.id > ? and cast(upper(label) as bytea) = ? ))
 			and owning_lib in ($orgs)
-		order by cast(upper(label) to bytea), 4, 2
+		order by cast(upper(label) as bytea), 4, 2
 		limit $size;
 	SQL
 
@@ -285,9 +285,9 @@
 			        $table cn
 			where
 				not deleted
-			        and (cast(upper(label) to bytea) < ? or ( cn.id < ? and cast(upper(label) to bytea) = ? ))
+			        and (cast(upper(label) as bytea) < ? or ( cn.id < ? and cast(upper(label) as bytea) = ? ))
 				and owning_lib in ($orgs)
-			order by cast(upper(label) to bytea) desc, 4 desc, 2 desc
+			order by cast(upper(label) as bytea) desc, 4 desc, 2 desc
 			limit $size
 		) as bar
 		order by 1,4,2;
@@ -343,9 +343,9 @@
 			        $table cn
 			where
 				not deleted
-			        and cast(upper(label) to bytea) < ?
+			        and cast(upper(label) as bytea) < ?
 				and owning_lib in ($orgs)
-			order by cast(upper(label) to bytea) desc, 4 desc, 2 desc
+			order by cast(upper(label) as bytea) desc, 4 desc, 2 desc
 			limit $topsize
 		) as bar
 		order by 1,4,2;
@@ -361,9 +361,9 @@
 		        $table cn
 		where
 			not deleted
-		        and cast(upper(label) to bytea) >= ?
+		        and cast(upper(label) as bytea) >= ?
 			and owning_lib in ($orgs)
-		order by cast(upper(label) to bytea),4,2
+		order by cast(upper(label) as bytea),4,2
 		limit $bottomsize;
 	SQL
 

Modified: trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql	2010-10-14 19:57:42 UTC (rev 18342)
+++ trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql	2010-10-14 20:04:05 UTC (rev 18343)
@@ -293,7 +293,7 @@
 CREATE INDEX asset_call_number_creator_idx ON asset.call_number (creator);
 CREATE INDEX asset_call_number_editor_idx ON asset.call_number (editor);
 CREATE INDEX asset_call_number_dewey_idx ON asset.call_number (public.call_number_dewey(label));
-CREATE INDEX asset_call_number_upper_label_id_owning_lib_idx ON asset.call_number (cast(upper(label) to bytea),id,owning_lib);
+CREATE INDEX asset_call_number_upper_label_id_owning_lib_idx ON asset.call_number (cast(upper(label) as bytea),id,owning_lib);
 CREATE INDEX asset_call_number_label_sortkey ON asset.call_number(cast(label_sortkey as bytea));
 CREATE UNIQUE INDEX asset_call_number_label_once_per_lib ON asset.call_number (record, owning_lib, label) WHERE deleted = FALSE OR deleted IS FALSE;
 CREATE RULE protect_cn_delete AS ON DELETE TO asset.call_number DO INSTEAD UPDATE asset.call_number SET deleted = TRUE WHERE OLD.id = asset.call_number.id;

Modified: trunk/Open-ILS/src/sql/Pg/upgrade/0438.schema.bytea-index-label.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0438.schema.bytea-index-label.sql	2010-10-14 19:57:42 UTC (rev 18342)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0438.schema.bytea-index-label.sql	2010-10-14 20:04:05 UTC (rev 18343)
@@ -4,6 +4,6 @@
 INSERT INTO config.upgrade_log (version) VALUES ('0438'); -- miker
 
 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 (cast(upper(label) to bytea),id,owning_lib);
+CREATE INDEX asset_call_number_upper_label_id_owning_lib_idx ON asset.call_number (cast(upper(label) as bytea),id,owning_lib);
 
 COMMIT;



More information about the open-ils-commits mailing list