Closed TheFive closed 7 years ago
Hey good question! I recommend not using a query as an event emitter - use pool.query
with either a promise response or a callback. Using a query as an event emitter will be deprecated in the next major release of node-postgres too! If you need to stream rows back use pg-query-stream
Hope this helps!
Thanks, then i have to refactor.
I try to transfer my code to the new pg-pool.
In my code i have used the query from a client as EventEmitter. This is not supported by pool.query. Do you plan to introduce that to, or is it a problem with the pooling ? (So should I refactor my code, or wait for a pg-pool update ?)