From b5f0ffc48fb23b1aac9edebed42e01f585d42a67 Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 13 Aug 2010 04:07:48 +0000 Subject: [PATCH] fix cut-n-paste-o git-svn-id: svn://svn.open-ils.org/ILS/trunk@17206 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/030.schema.metabib.sql | 4 ++-- Open-ILS/src/sql/Pg/upgrade/0370.schema.protect-authority-linking.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/sql/Pg/030.schema.metabib.sql b/Open-ILS/src/sql/Pg/030.schema.metabib.sql index c78706242..c9e8316ef 100644 --- a/Open-ILS/src/sql/Pg/030.schema.metabib.sql +++ b/Open-ILS/src/sql/Pg/030.schema.metabib.sql @@ -900,9 +900,9 @@ CREATE OR REPLACE FUNCTION biblio.map_authority_linking (bibid BIGINT, marc TEXT SELECT y.bib, y.authority FROM ( SELECT DISTINCT $1 AS bib, - BTRIM(remove_paren_substring(x))::BIGINT AS authority + BTRIM(remove_paren_substring(txt))::BIGINT AS authority FROM explode_array(oils_xpath('//*[@code="0"]/text()',$2)) x(txt) - WHERE BTRIM(remove_paren_substring(x)) ~ $re$^\d+$$re$ + WHERE BTRIM(remove_paren_substring(txt)) ~ $re$^\d+$$re$ ) y JOIN authority.record_entry r ON r.id = y.authority; SELECT $1; $func$ LANGUAGE SQL; diff --git a/Open-ILS/src/sql/Pg/upgrade/0370.schema.protect-authority-linking.sql b/Open-ILS/src/sql/Pg/upgrade/0370.schema.protect-authority-linking.sql index 7109fbd8a..ee57681a2 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0370.schema.protect-authority-linking.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0370.schema.protect-authority-linking.sql @@ -8,9 +8,9 @@ CREATE OR REPLACE FUNCTION biblio.map_authority_linking (bibid BIGINT, marc TEXT SELECT y.bib, y.authority FROM ( SELECT DISTINCT $1 AS bib, - BTRIM(remove_paren_substring(x))::BIGINT AS authority + BTRIM(remove_paren_substring(txt))::BIGINT AS authority FROM explode_array(oils_xpath('//*[@code="0"]/text()',$2)) x(txt) - WHERE BTRIM(remove_paren_substring(x)) ~ $re$^\d+$$re$ + WHERE BTRIM(remove_paren_substring(txt)) ~ $re$^\d+$$re$ ) y JOIN authority.record_entry r ON r.id = y.authority; SELECT $1; $func$ LANGUAGE SQL; -- 2.11.0