New intarray-focused attribute extraction
authorMike Rylander <mrylander@gmail.com>
Wed, 15 Jan 2014 17:07:59 +0000 (12:07 -0500)
committerMike Rylander <mrylander@gmail.com>
Wed, 22 Jan 2014 14:45:01 +0000 (09:45 -0500)
commit0c094180d2dc176550ce59b553835c7da5565f64
tree5cbcfca6073d698bb43504a70da01428a9131e37
parentb1ea1ab9a1351280ba16d1bc23d106483a9ef9b4
New intarray-focused attribute extraction

We rewrite the record attribute extraction to capture all the
record-supplied values for each attribute (where multi is true)
and store that list in the new (fkey-corrected) metabib.record_attr_vector_list
table.  Only filters make it into this table.

We also insert a parameter after the record id to accept a list of
record attributes we want to rewrite. This defaults to NULL to rewrite
all of them.

Sorters are stored in a new, separate table built specifically for them.

metabib.record_attr becomes a vew atop metabib.record_attr_vector_list
which expands the intarray stored therein into an hstore. For
multi=true attributes, only one will be returned through this view,
as is HSTORE's way, and which will be returned is undefined.  However
this view is only provided for the purpose of backward compat with
reports or other locally defined logic.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/030.schema.metabib.sql