Permalink
Browse files

Handle 8.1 default formatting. Closes #10333 [Tim Pope]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8254 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 84ca7e6 commit e7c5da6260918d770f9d7abd311337ff1cb09d60 @jeremy jeremy committed Dec 2, 2007
Showing with 3 additions and 0 deletions.
  1. +3 −0 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -165,6 +165,9 @@ def self.extract_value_from_default(default)
# Character types
when /\A'(.*)'::(?:character varying|bpchar|text)\z/m
$1
+ # Character types (8.1 formatting)
+ when /\AE'(.*)'::(?:character varying|bpchar|text)\z/m
+ $1.gsub(/\\(\d\d\d)/) { $1.oct.chr }
# Binary data types
when /\A'(.*)'::bytea\z/m
$1

0 comments on commit e7c5da6

Please sign in to comment.