Prevent {NULL} values from blocking bib saving
authorDan Scott <dscott@laurentian.ca>
Tue, 3 Jan 2012 16:53:49 +0000 (11:53 -0500)
committerDan Scott <dscott@laurentian.ca>
Fri, 17 Jan 2014 01:52:32 +0000 (20:52 -0500)
commit2671e528bc571c110be342fc7eff15050038b633
tree4919a20f1452e73ef66c39051b5cfdf65a2b4aae
parent8e36bd2a407d3a6c8c8ca75b5d51ecc79b128cc4
Prevent {NULL} values from blocking bib saving

With both the old ARRAY_ACCUM and ARRAY_AGG, and with array_nulls on,
PostgreSQL 9.0 on Debian Squeeze was generating values of '{NULL}'
rather than actual nulls. This would in turn prevent bibs without ISBNs
or ISSNs from being saved successfully. A CASE statement protects
against that problem and returns a clean NULL.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/reporter-schema.sql