[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.4-169-gf8e7331

Jesse Vincent jesse at bestpractical.com
Tue Oct 19 03:20:55 EDT 2010


The branch, 3.9-trunk has been updated
       via  f8e73310312f07ed02aa668f06184994dd59c9bf (commit)
      from  6b7a0c41f41bf36f0e4ce0e013c72bfbcc60c54e (commit)

Summary of changes:
 lib/RT/Handle.pm |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit f8e73310312f07ed02aa668f06184994dd59c9bf
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Oct 19 16:06:48 2010 +0900

    Postgres 9 changed their default representation of BYTEA values. RT
    expects the older "Escape" version. Use that instead.

diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index e0940ee..62c69e5 100755
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -120,6 +120,15 @@ sub Connect {
         $self->dbh->do("SET NAMES 'utf8'") if $version >= 4.1;
     }
 
+
+    if ( $db_type eq 'Pg' ) {
+        my $version = $self->DatabaseVersion;
+        ($version) = $version =~ /^(\d+\.\d+)/;
+        $self->dbh->do("SET bytea_output = 'escape'") if $version >= 9.0;
+    }
+
+
+
     $self->dbh->{'LongReadLen'} = RT->Config->Get('MaxAttachmentSize');
 }
 

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


More information about the Rt-commit mailing list