node-postgres/test/integration/client/field-name-escape-tests.js
2017-08-12 16:25:09 -05:00

11 lines
246 B
JavaScript

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()
})