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>
Sun, 28 Apr 2013 16:40:03 +0000 (12:40 -0400)
commiteab2976c57f07579d698ca52ba3246c5f2efca8a
tree9a1149134fe2fd29c574d0dd1a04c1c30533ef59
parent9553b6e2c7e4181839a98b7e4b2a1446fb8f66b9
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