LP#1549505: Query literal interpolation casts incorrectly
authorMike Rylander <mrylander@gmail.com>
Thu, 26 May 2016 21:51:49 +0000 (17:51 -0400)
committerKathy Lussier <klussier@masslnc.org>
Thu, 21 Jul 2016 15:51:22 +0000 (11:51 -0400)
commit3a018c721db64c698e7e24ebee7ce3d218e9c0da
tree43f022ce8845e2a408ff9b81edbcd23c2c581c90
parentf995919b78e9798f7de812f71e65b44189a79d00
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
committ 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>
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