Prevent {NULL} values from blocking bib saving
authorDan Scott <dscott@laurentian.ca>
Tue, 3 Jan 2012 16:53:49 +0000 (11:53 -0500)
committerBen Shum <bshum@biblio.org>
Fri, 7 Feb 2014 05:51:29 +0000 (00:51 -0500)
commit26ce682c104095c87b8e742b7a05c4b2ca84a8d3
tree3b3518a58e6f23268170eab87f8f2347c9aeb6a3
parent4b3ea8b6ca66d6db8dd2cf4638d6977043583386
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