LP#1116509: prevent null SVF attribute value from breaking record import
[working/Evergreen.git] / Open-ILS / src / sql / Pg / 012.schema.vandelay.sql
index b7f79d0..def8dfd 100644 (file)
@@ -460,7 +460,7 @@ BEGIN
               WHERE attr = attr_def.name
               ORDER BY m.pos LOOP
                 EXECUTE 'SELECT ' || normalizer.func || '(' ||
-                    quote_literal( attr_value ) ||
+                    quote_nullable( attr_value ) ||
                     CASE
                         WHEN normalizer.param_count > 0
                             THEN ',' || REPLACE(REPLACE(BTRIM(normalizer.params,'[]'),E'\'',E'\\\''),E'"',E'\'')