         # File lib/em/protocols/postgres3.rb, line 115
    115:       def connect db, user, psw=nil
    116:         d = EM::DefaultDeferrable.new
    117:         d.timeout 15
    118:
    119:         if @pending_query || @pending_conn
    120:           d.succeed false, "Operation already in progress"
    121:         else
    122:           @pending_conn = d
    123:           prms = {"user"=>user, "database"=>db}
    124:           @user = user
    125:           if psw
    126:             @password = psw
    127:             #prms["password"] = psw
    128:           end
    129:           send_data PostgresPR::StartupMessage.new( 3 << 16, prms ).dump
    130:         end
    131:
    132:         d
    133:       end