社区包: https://www.npmjs.com/package/pg
开源地址:https://github.com/brianc/node-postgres/
我定义的数据库列名是大小写 , 查询语句也是大小写,结果提示
error: column "" does not exist
at Connection.parseE (node_modules\pg\lib\connection.js:569:11)
at Connection.parseMessage (node_modules\pg\lib\connection.js:396:17)
at Socket.<anonymous> (node_modules\pg\lib\connection.js:132:22)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:153:18)
at Socket.Readable.push (_stream_readable.js:111:10)
at TCP.onread (net.js:537:20)
然后我在 https://github.com/brianc/node-postgres/issues/195 找到了答案
var queryText = ‘select "firstName" from "User"‘
Cheers
时间: 2024-10-14 14:47:10