Replace ARRAY_ACCUM() custom function with ARRAY_AGG()
authorDan Scott <dscott@laurentian.ca>
Wed, 12 Oct 2011 03:53:33 +0000 (23:53 -0400)
committerDan Scott <dscott@laurentian.ca>
Fri, 17 Jan 2014 01:52:19 +0000 (20:52 -0500)
commitc905e36256aa9e81106dff4776a55c37078a4667
treed48e2fcff7d53bcb7c49e6b2940a78c2aa900be4
parent0893dfdcd559a12489d9c2f9f9a957fbd12a5eae
Replace ARRAY_ACCUM() custom function with ARRAY_AGG()

Tested each replacement to ensure that the return of NULL instead of
'{}' empty array doesn't break anything - although some functions didn't
seem to work with either function (for example,
asset.merge_record_assets() doesn't seem to actually move an 856 from
the source to the target record).

Also replace ARRAY_TO_STRING(ARRAY_AGG()) with STRING_AGG() in a couple
of places; see
http://www.depesz.com/index.php/2010/02/17/waiting-for-9-0-string_agg/
for one reason why (likely performance gain).

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/000.functions.general.sql
Open-ILS/src/sql/Pg/030.schema.metabib.sql
Open-ILS/src/sql/Pg/100.circ_matrix.sql
Open-ILS/src/sql/Pg/110.hold_matrix.sql
Open-ILS/src/sql/Pg/300.schema.staged_search.sql
Open-ILS/src/sql/Pg/990.schema.unapi.sql
Open-ILS/src/sql/Pg/999.functions.global.sql
Open-ILS/src/sql/Pg/example.reporter-extension.sql
Open-ILS/src/sql/Pg/reporter-schema.sql