Skip to content
Browse files

PostgreSQL returns the path type wrapped in quotes.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent e30699f commit 64cd4e417059f363a55023d28b05f9e0d349e3f9 Marcel Molina committed Oct 9, 2005
View
2 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -355,7 +355,7 @@ def translate_field_type(field_type)
when /^real|^money/i then 'float'
when /^interval/i then 'string'
# geometric types (the line type is currently not implemented in postgresql)
- when /^point|lseg|box|path|polygon|circle/i then 'string'
+ when /^(?:point|lseg|box|"?path"?|polygon|circle)/i then 'string'
when /^bytea/i then 'binary'
else field_type # Pass through standard types.
end
View
2 activerecord/lib/active_record/schema_dumper.rb
@@ -59,7 +59,7 @@ def table(table, stream)
columns.each do |column|
next if column.name == "id"
stream.print " t.column #{column.name.inspect}, #{column.type.inspect}"
- stream.print ", :limit => #{column.limit.inspect}" if column.limit != @types[column.type][:limit]
+ stream.print ", :limit => #{column.limit.inspect}" if column.limit != @types[column.type][:limit]
stream.print ", :default => #{column.default.inspect}" if !column.default.nil?
stream.print ", :null => false" if !column.null
stream.puts

0 comments on commit 64cd4e4

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