Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

#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
@arturopie authored
View
3  activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
@@ -280,9 +280,6 @@ def pk_and_sequence_for(table) #:nodoc:
end_sql
if result.nil? or result.empty?
- # If that fails, try parsing the primary key's default value.
- # Support the 7.x and 8.0 nextval('foo'::text) as well as
- # the 8.1+ nextval('foo'::regclass).
result = query(<<-end_sql, 'SCHEMA')[0]
SELECT attr.attname,
CASE
View
3  activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -80,9 +80,6 @@ def self.extract_value_from_default(default)
# Character types
when /\A\(?'(.*)'::.*\b(?: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
Please sign in to comment.
Something went wrong with that request. Please try again.