]> git.evergreen-ils.org Git - Evergreen.git/commit
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, 7 Feb 2014 22:00:09 +0000 (17:00 -0500)
commitbd50424f525f4a32ccc965b3835fee7256015254
treea27094689cd15b03e4e9913afcdd0cbb6d258d6d
parentdd576d0b8fccb523122f30f1bb54309ca3959dcb
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