From ac0024830fc8289c826a77bed396589ac7c2042e 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 Signed-off-by: Ben Shum --- 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 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', -- 2.43.2