LP#1549505: Query literal interpolation casts incorrectly user/miker/lp1549505_popularity_ratings_signedoff_fix2
authorMike Rylander <mrylander@gmail.com>
Thu, 26 May 2016 21:51:49 +0000 (17:51 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 27 May 2016 16:00:53 +0000 (12:00 -0400)
commit42ec71ebf5740912129e19f18524de20b95e3b98
treeed63f0dc790389994519b4bbee92ba93c4bf3a33
parentb821e57f6cae7fa703e9c379bc83a3537686f2ea
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