fixed pg complaint about deprecated calling convention

added a third 'done' parameter to the client invocation, and calling
done() when the response is ended.