diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-07-24 13:38:11 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-07-24 13:38:11 -0700 |
commit | 994b2be1b9b039d309a9527ac598a16cbb7e80e9 (patch) | |
tree | 7ce9462dd803ddfbc20626ebacf0a49b3782bf82 /FS | |
parent | 35b65801a513763ee70abade18d3a2c324daaf73 (diff) |
PG_BYTEA seems to be working nowadays, and uses much less memory than our alternative, RT#76731
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Record.pm | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 7e486905d..f2e9e6fba 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -3554,11 +3554,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); } |