LP#1549505: Query literal interpolation casts incorrectly
authorMike Rylander <mrylander@gmail.com>
Thu, 26 May 2016 21:51:49 +0000 (17:51 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 28 Jul 2016 15:57:04 +0000 (11:57 -0400)
commit6153d83a04114dc80bea3d5210e0ebb8589d877b
tree40d2f41bc857cfdfd377f186ecb19fe6ccb4de9f
parent7d63e925c497a854373b1fcf8226f6b68561f13a
LP#1549505: Query literal interpolation casts incorrectly

We need to be sure that all query values are of the same type in the same
columns because PLPGSQL functions are compiled and cached.  In this case,
the core query of the in-db search cannot have its shape change.  This
commit assures that browse and search uses of the SP provide core queries
that match on their SELECT lists.  Of particular importance is the type
of the "rel" output column, which was variously float8 or numeric, depending
on whether the search contained any terms (a "search") or not (a browse
link).

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Open-ILS/src/sql/Pg/030.schema.metabib.sql
Open-ILS/src/sql/Pg/upgrade/YYYY.function.qp_search.sql