]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#1463973: Use dollar-quoting for report literals
authorMike Rylander <mrylander@gmail.com>
Wed, 10 Jun 2015 18:17:37 +0000 (14:17 -0400)
committerBen Shum <bshum@biblio.org>
Thu, 11 Jun 2015 01:41:15 +0000 (21:41 -0400)
commit6c23f78065ec32cf5849a4bd2c6313806a833c44
tree171e9b613f4a39b546b8b23b7a146f0c614262d9
parentb67ad6939c6572c55f700adc2069096701f17d7c
LP#1463973: Use dollar-quoting for report literals

When inserting string literal into SQL for Clark, we quote
apostrophes with a backslash.  That worked fine until Postgres
changed its default for the standard_conforming_strings GUC to "on"
after which it no longer worked fine.

So, we will now use "dollar quoting" for string literals instead
in much the same way we do for our search queries.

Test plan
---------

Pre-patch: Try to run a report where a string value is required as
a filter parameter, and include an apostrophe in that string.  The
report will fail with an SQL error.

Post-patch: Do the same, it will not fail.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Angela Kilsdonk <akilsdonk@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm