LP#1463973: Use dollar-quoting for report literals user/miker/lp1463973-dollar-quote-literals
authorMike Rylander <mrylander@gmail.com>
Wed, 10 Jun 2015 18:17:37 +0000 (14:17 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 10 Jun 2015 20:42:02 +0000 (16:42 -0400)
commit2f874e3bf8230d857d5d0d0009a139a40f5d1008
tree787bb4bff11e49d126a22724695431536d0a8dbd
parent18d51a404ada15f07b94c4cc3d6d678cadcf607b
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>
Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm