break out holding code into materialized view
otherwise it's really awkward to get at the information in the
json-encoded array stored in a single column that hols the holding code,
which we must break apart to build a year->month->day tree or a
v.->no.->iss. tree or whatever.
example sql to help me remember where I'm going (not a final version of
anything):
-- if nothing expanded:
select
sdist.display_grouping,
siss.id,
siss.label,
smhc.value
from serial.basic_summary sbsum
join serial.distribution sdist on (sdist.id = sbsum.distribution)
join serial.stream sstr on (sstr.distribution = sdist.id)
join serial.item sitem on (sitem.stream = sstr.id)
join serial.issuance siss on (siss.id = sitem.issuance)
join serial.materialized_holding_code smhc on (smhc.issuance = siss.id)
where smhc.subfield = 'i';
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>