diff --git a/lib/postgresql.js b/lib/postgresql.js index c4f1eeb..0a8a26c 100644 --- a/lib/postgresql.js +++ b/lib/postgresql.js @@ -123,7 +123,7 @@ PostgreSQL.prototype.executeSQL = function(sql, params, options, callback) { debug('SQL: %s', sql); } - if (sql && sql.match(/UPDATE/i) && !sql.match(/WHERE/i) && self.settings.blockUpdateWithoutWhere) { + if (sql && sql.match('UPDATE') && !sql.match('WHERE') && self.settings.blockUpdateWithoutWhere) { return process.nextTick(function() { callback(new Error(g.f('Você está executando um update sem WHERE. Corrija essa query, meu caro:',sql))); });