]> 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:40:31 +0000 (21:40 -0400)
commitc5f28366936af76b66095de8120c8f08ec7e9b0d
tree4be50a54b9c2ef3484f8e74107d40c4123561d62
parenta0d989091da997d6c571c9ed611f3784df54107d
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