node-postgres/test/integration/client/field-name-escape-tests.js

11 lines
246 B
JavaScript
Raw Normal View History

2017-08-13 05:04:29 +08:00
var pg = require('./test-helper').pg
var sql = 'SELECT 1 AS "\\\'/*", 2 AS "\\\'*/\n + process.exit(-1)] = null;\n//"'
var client = new pg.Client()
client.connect()
client.query(sql, function (err, res) {
if (err) throw err
client.end()
})