node-postgres有个坑
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了node-postgres有个坑相关的知识,希望对你有一定的参考价值。
社区包: 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
以上是关于node-postgres有个坑的主要内容,如果未能解决你的问题,请参考以下文章