projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
35b6580
)
PG_BYTEA seems to be working nowadays, and uses much less memory than our alternative...
author
Ivan Kohler
<ivan@freeside.biz>
Mon, 24 Jul 2017 20:38:11 +0000
(13:38 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Mon, 24 Jul 2017 20:38:11 +0000
(13:38 -0700)
FS/FS/Record.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
7e48690
..
f2e9e6f
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-3554,11
+3554,7
@@
sub _quote {
&& driver_name eq 'Pg'
)
{
&& 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);
}
} else {
dbh->quote($value);
}