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=ac0024830fc8289c826a77bed396589ac7c2042e;p=evergreen%2Fequinox.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 Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/sql/Pg/999.functions.global.sql b/Open-ILS/src/sql/Pg/999.functions.global.sql index 070c58314f..ac20ce7a3c 100644 --- a/Open-ILS/src/sql/Pg/999.functions.global.sql +++ b/Open-ILS/src/sql/Pg/999.functions.global.sql @@ -1003,17 +1003,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',