summaryrefslogtreecommitdiff
path: root/FS/FS/Record.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-07-24 13:38:12 -0700
committerIvan Kohler <ivan@freeside.biz>2017-07-24 13:38:12 -0700
commit8741aff54c6fd4a9fa8c9a1fc6da8a7e68c4b496 (patch)
tree5ef5fd5ab2be5dda468178b1dfee88c4fd39c92d /FS/FS/Record.pm
parentb9b9f0dbf96655eff2fb020ce7c0f61dac19592a (diff)
PG_BYTEA seems to be working nowadays, and uses much less memory than our alternative, RT#76731
Diffstat (limited to 'FS/FS/Record.pm')
-rw-r--r--FS/FS/Record.pm6
1 files changed, 1 insertions, 5 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 514520e..9e47118 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -3550,11 +3550,7 @@ sub _quote {
&& driver_name eq 'Pg'
)
{
- no strict 'subs';
-# dbh->quote($value, { pg_type => PG_BYTEA() }); # doesn't work right
- # Pg binary string quoting: convert each character to 3-digit octal prefixed with \\,
- # single-quote the whole mess, and put an "E" in front.
- return ("E'" . join('', map { sprintf('\\\\%03o', ord($_)) } split(//, $value) ) . "'");
+ dbh->quote($value, { pg_type => PG_BYTEA() });
} else {
dbh->quote($value);
}