Fix located URI merging in action.merge_record_assets() user/dbs/fix-merge-record-assets-2_1
authorDan Scott <dscott@laurentian.ca>
Thu, 13 Oct 2011 17:09:38 +0000 (13:09 -0400)
committerDan Scott <dscott@laurentian.ca>
Thu, 13 Oct 2011 17:09:38 +0000 (13:09 -0400)
commite877f1b2a8254f60cae7b9884fe47a94e9047fe9
tree1ce2f3794e52e8da5bdd5a62c84fb6d205604167
parent6ff9b39db6a95d51fe298d052f5a03668cedfdd8
Fix located URI merging in action.merge_record_assets()

Perhaps due to the unexpected results of the XPath expression, which
returns a count of nodes for subfields, etc, rather than just a count of
the number of 856 datafields, NULL was being concatenated onto a string
- which of course made the string NULL.

Use COALESCE() to prevent the NULLness from spreading and enable
action.merge_record_assets() to do the right thing.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/sql/Pg/999.functions.global.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.asset_merge_record_assets.sql [new file with mode: 0644]