Trivial line-wrapping patch for call number class defaults
authorDan Scott <dan@coffeecode.net>
Wed, 25 May 2011 01:56:13 +0000 (21:56 -0400)
committerDan Scott <dan@coffeecode.net>
Wed, 25 May 2011 01:56:13 +0000 (21:56 -0400)
Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/src/sql/Pg/040.schema.asset.sql
Open-ILS/src/sql/Pg/upgrade/0541.schema.call_number_honor_default_class.sql

index f335713..735cc64 100644 (file)
@@ -201,7 +201,14 @@ BEGIN
     sortkey := NEW.label_sortkey;
 
     IF NEW.label_class IS NULL THEN
-        NEW.label_class := COALESCE( (SELECT substring(value from E'\\d+')::integer from actor.org_unit_setting WHERE name = 'cat.default_classification_scheme' AND org_unit = NEW.owning_lib), 1 );
+            NEW.label_class := COALESCE(
+            (
+                SELECT substring(value from E'\\d+')::integer
+                FROM actor.org_unit_setting
+                WHERE name = 'cat.default_classification_scheme'
+                AND org_unit = NEW.owning_lib
+            ), 1
+        );
     END IF;
 
     EXECUTE 'SELECT ' || acnc.normalizer || '(' || 
index 32be6a3..9b6f5c9 100644 (file)
@@ -11,7 +11,14 @@ BEGIN
     sortkey := NEW.label_sortkey;
 
     IF NEW.label_class IS NULL THEN
-        NEW.label_class := COALESCE( (SELECT substring(value from E'\\d+')::integer from actor.org_unit_setting WHERE name = 'cat.default_classification_scheme' AND org_unit = NEW.owning_lib), 1);
+        NEW.label_class := COALESCE(
+            (
+                SELECT substring(value from E'\\d+')::integer
+                FROM actor.org_unit_setting
+                WHERE name = 'cat.default_classification_scheme'
+                AND org_unit = NEW.owning_lib
+            ), 1
+        );
     END IF;
 
     EXECUTE 'SELECT ' || acnc.normalizer || '(' ||