Index: lib/merb/orms/sequel/connection.rb =================================================================== --- lib/merb/orms/sequel/connection.rb (revision 648) +++ lib/merb/orms/sequel/connection.rb (working copy) @@ -36,12 +36,23 @@ password = config[:password] # Use Sequel::Model.db to access this object ::Sequel.mysql(config[:database], :host => host, :user => user, :password => password, :logger => MERB_LOGGER) + when 'postgresql' + require "sequel/postgres" + host = config[:host] || 'localhost' + user = config[:user] || config[:username] || 'root' + password = config[:password] + encoding = config[:encoding] || config[:charset] || nil + if encoding + ::Sequel.postgres(config[:database], :host => host, :user => user, :password => password, :encoding => encoding, :logger => MERB_LOGGER) + else + ::Sequel.postgres(config[:database], :host => host, :user => user, :password => password, :logger => MERB_LOGGER) + end when 'sqlite' require "sequel/sqlite" if config[:database] - ::Sequel.sqlite config[:database] + ::Sequel.sqlite(config[:database], :logger => MERB_LOGGER) else - ::Sequel.sqlite + ::Sequel.sqlite(:logger => MERB_LOGGER) end else require "sequel/sqlite" @@ -67,4 +78,4 @@ end end end -end \ No newline at end of file +end