aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-07-10 19:54:21 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-07-10 19:54:21 +0000
commitac681152051884c173486006089fc459cbf7128e (patch)
tree0e1af0d77512d3279a64b7facd19a9672f69196e /activerecord/lib/active_record/connection_adapters
parentf0c22d4ad5c61e7e683291fd42e143d1a339c3a2 (diff)
downloadrails-ac681152051884c173486006089fc459cbf7128e.tar.gz
rails-ac681152051884c173486006089fc459cbf7128e.tar.bz2
rails-ac681152051884c173486006089fc459cbf7128e.zip
PostgreSQL: return array fields as strings. Closes #4664.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4605 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 2fa357993f..94584a5ea4 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -515,6 +515,8 @@ module ActiveRecord
def translate_field_type(field_type)
# Match the beginning of field_type since it may have a size constraint on the end.
case field_type
+ # PostgreSQL array data types.
+ when /\[\]$/i then 'string'
when /^timestamp/i then 'datetime'
when /^real|^money/i then 'float'
when /^interval/i then 'string'