Log warnings from COPY TO

This commit is contained in:
Rafa de la Torre 2019-06-04 16:40:25 +02:00
parent a075965214
commit 0ee426172f

View File

@ -53,6 +53,7 @@ module.exports = class StreamCopy {
if (action === ACTION_TO) {
pgstream.on('end', () => done());
pgstream.on('error', () => this._cancel(client.processID, action));
pgstream.on('warning', (msg) => this.logger.warn(msg));
} else if (action === ACTION_FROM) {
pgstream.on('finish', () => done());
pgstream.on('error', err => client.connection.sendCopyFail(err.message));