提交 6aaa08d8 编写于 作者: J Jeremy Kemper

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

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
上级 ac66cf12
*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])
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册