diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 5087a98e6f..9f0e71aad4 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* PostgreSQL: don't ignore port when host is nil since it's often used to label the domain socket. #5247 [shimbo@is.naist.jp] + * Records and arrays of records are bound as quoted ids. [Jeremy Kemper] Foo.find(:all, :conditions => ['bar_id IN (?)', bars]) Foo.find(:first, :conditions => ['bar_id = ?', bar]) diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index a9c140f27a..594d5c8f43 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -8,7 +8,7 @@ module ActiveRecord config = config.symbolize_keys host = config[:host] - port = config[:port] || 5432 unless host.nil? + port = config[:port] || 5432 username = config[:username].to_s password = config[:password].to_s |