[freeside-commits] branch FREESIDE_3_BRANCH updated. 2e9cc46750e02ecf9dfabe04283d98d8afa86c26

Ivan ivan at 420.am
Mon Jul 24 13:38:15 PDT 2017


The branch, FREESIDE_3_BRANCH has been updated
       via  2e9cc46750e02ecf9dfabe04283d98d8afa86c26 (commit)
      from  91c7741223e84c67b64693cf4bbab6cfbd944e7e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2e9cc46750e02ecf9dfabe04283d98d8afa86c26
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jul 24 13:38:14 2017 -0700

    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 c98de0a..c05dac0 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);
   }

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Record.pm |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)




More information about the freeside-commits mailing list