From: Ivan Kohler Date: Mon, 24 Jul 2017 20:38:14 +0000 (-0700) Subject: PG_BYTEA seems to be working nowadays, and uses much less memory than our alternative... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2e9cc46750e02ecf9dfabe04283d98d8afa86c26 PG_BYTEA seems to be working nowadays, and uses much less memory than our alternative, RT#76731 --- diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index c98de0a94..c05dac00b 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -3342,11 +3342,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); }