Open
Description
client.on('notice', ...) doesn't work with native bindings
pg = require('pg').native;
client = new pg.Client(...);
client.on('notice', function(msg) {
console.log("custom notice: " + msg);
});
client.connect(function(err){
if (err){
console.log(err);
}
q = "do $$begin raise notice 'my message'; end;$$";
client.query(q, function(err, result){
if (err){
console.log(err);
}
});
});
Expected output the same as with javascript bindings:
custom notice: notice: my message
Got:
NOTICE: my message
Versions:
$ node --version
v0.12.0
$ npm list pg-native
└── pg-native@1.8.0
$ npm list pg
└── pg@4.3.0