[open-ils-commits] r20306 - trunk/Open-ILS/src/sql/Pg (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 25 14:42:16 EDT 2011
Author: miker
Date: 2011-04-25 14:42:11 -0400 (Mon, 25 Apr 2011)
New Revision: 20306
Modified:
trunk/Open-ILS/src/sql/Pg/030.schema.metabib.sql
Log:
Regression in pulling physical characteristics from a record in an SVF world, spotted by Jason Stephenson
Modified: trunk/Open-ILS/src/sql/Pg/030.schema.metabib.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/030.schema.metabib.sql 2011-04-25 18:24:33 UTC (rev 20305)
+++ trunk/Open-ILS/src/sql/Pg/030.schema.metabib.sql 2011-04-25 18:42:11 UTC (rev 20306)
@@ -1065,9 +1065,10 @@
attr_value := oils_xpath_string(attr_def.xpath, transformed_xml, COALESCE(attr_def.joiner,' '), ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]]);
ELSIF attr_def.phys_char_sf IS NOT NULL THEN -- a named Physical Characteristic, see config.marc21_physical_characteristic_*_map
- SELECT value::TEXT INTO attr_value
- FROM biblio.marc21_physical_characteristics(NEW.id)
- WHERE subfield = attr_def.phys_char_sf
+ SELECT m.value INTO attr_value
+ FROM biblio.marc21_physical_characteristics(NEW.id) v
+ config.marc21_physical_characteristic_value_map m ON (m.id = v.value)
+ WHERE v.subfield = attr_def.phys_char_sf
LIMIT 1; -- Just in case ...
END IF;
More information about the open-ils-commits
mailing list