Skip to content
This repository
Browse code

#7914 Remove code for unsupported postgreSQL version.

Remove parsing of character type default values for 8.1 formatting since
Rails doesn't support postgreSQL 8.1 anymore.

Remove misleading comment unrelated to code.
  • Loading branch information...
commit 8fb841bddefbd2b7ad6b3d7b560111ef0d7fefda 1 parent 40475cf
Arturo Pie authored October 13, 2012
3  activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
@@ -280,9 +280,6 @@ def pk_and_sequence_for(table) #:nodoc:
280 280
           end_sql
281 281
 
282 282
           if result.nil? or result.empty?
283  
-            # If that fails, try parsing the primary key's default value.
284  
-            # Support the 7.x and 8.0 nextval('foo'::text) as well as
285  
-            # the 8.1+ nextval('foo'::regclass).
286 283
             result = query(<<-end_sql, 'SCHEMA')[0]
287 284
               SELECT attr.attname,
288 285
                 CASE
3  activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -80,9 +80,6 @@ def self.extract_value_from_default(default)
80 80
           # Character types
81 81
           when /\A\(?'(.*)'::.*\b(?:character varying|bpchar|text)\z/m
82 82
             $1
83  
-          # Character types (8.1 formatting)
84  
-          when /\AE'(.*)'::(?:character varying|bpchar|text)\z/m
85  
-            $1.gsub(/\\(\d\d\d)/) { $1.oct.chr }
86 83
           # Binary data types
87 84
           when /\A'(.*)'::bytea\z/m
88 85
             $1

0 notes on commit 8fb841b

Please sign in to comment.
Something went wrong with that request. Please try again.