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, 29 Jan 2014 18:21:22 +0000 (13:21 -0500)
commitfefc4d24ba2870741a56f9a270ed08232f416c02
tree0ddfb0fb20a8c1f841b97d4b2d2d7b4050a872f1
parentf47768d695b7b4de5ff1ca3d4051e07b834e9d1b
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