LP#1549505: Query literal interpolation casts incorrectly user/miker/lp1549505_popularity_ratings_signedoff_fix2_rebase
authorMike Rylander <mrylander@gmail.com>
Thu, 26 May 2016 21:51:49 +0000 (17:51 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 13 Jun 2016 12:53:10 +0000 (08:53 -0400)
commit81b90283e1d1afcc8f1140e1844c43a1494e8e72
tree0138e930fcf727f61b3ca24712bce2f3edd05350
parent6b9b87654a19518e1eddee6be4a9f80d0b5dbb01
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