# File lib/em/protocols/postgres3.rb, line 135
135:       def query sql
136:         d = EM::DefaultDeferrable.new
137:         d.timeout 15
138: 
139:         if @pending_query || @pending_conn
140:           d.succeed false, "Operation already in progress"
141:         else
142:           @r = PostgresPR::Connection::Result.new
143:           @e = []
144:           @pending_query = d
145:           send_data PostgresPR::Query.dump(sql)
146:         end
147: 
148:         d
149:       end