From 001d6b909cd9f6f21e2fb6bc21a54d9ee247f69a Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Thu, 13 Oct 2011 18:56:26 -0400 Subject: [PATCH] Teach asset.merge_record_assets about STRING_AGG() Now that asset.merge_record_assets() is working, cut over to STRING_AGG() so it can iterate over those unnecessary nodes faster :) Signed-off-by: Dan Scott --- Open-ILS/src/sql/Pg/999.functions.global.sql | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/sql/Pg/999.functions.global.sql b/Open-ILS/src/sql/Pg/999.functions.global.sql index da05afec04..53db65b312 100644 --- a/Open-ILS/src/sql/Pg/999.functions.global.sql +++ b/Open-ILS/src/sql/Pg/999.functions.global.sql @@ -996,17 +996,15 @@ BEGIN ' tag="856"' || ' ind1="' || FIRST(ind1) || '"' || ' ind2="' || FIRST(ind2) || '">' || - array_to_string( - ARRAY_AGG( - '' || + STRING_AGG( + '' || + regexp_replace( regexp_replace( - regexp_replace( - regexp_replace(data,'&','&','g'), - '>', '>', 'g' - ), - '<', '<', 'g' - ) || '' - ), '' + regexp_replace(data,'&','&','g'), + '>', '>', 'g' + ), + '<', '<', 'g' + ) || '', '' ) || '' INTO uri_datafield FROM oils_xpath_table( 'id', -- 2.11.0