Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

PostgreSQL: don't ignore port when host is nil since it's often used …

…to label the domain socket. Closes #5247.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4401 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 6aaa08d85b4acb89c44e951398e9f6a5e3e0daec 1 parent ac66cf1
@jeremy jeremy authored
View
2  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])
View
2  activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -8,7 +8,7 @@ def self.postgresql_connection(config) # :nodoc:
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
Please sign in to comment.
Something went wrong with that request. Please try again.