]> git.evergreen-ils.org Git - Evergreen.git/commit
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>
Fri, 29 Jul 2016 20:56:11 +0000 (16:56 -0400)
commitae3bb32ede6e7569b935a92ed5bc7fc1cb0564cf
tree40d2f41bc857cfdfd377f186ecb19fe6ccb4de9f
parent3d5b37a1072bfd177bf484d02e717dae57a62427
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>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
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