From: Dan Scott Date: Thu, 13 Oct 2011 22:56:26 +0000 (-0400) Subject: Teach asset.merge_record_assets about STRING_AGG() X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=001d6b909cd9f6f21e2fb6bc21a54d9ee247f69a;p=working%2FEvergreen.git 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 --- 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',