Open JamesRen88 opened 5 years ago
pg was created before a JavaScript primitive that could represent 64-bit integers precisely existed, but you can change the parser to produce a BigInt
nowadays:
const types = require('pg').types;
const INT8_OID = 20;
types.setTypeParser(INT8_OID, BigInt);
数据库设计字段类型为:int8,通过查询返回字段值是字符串类型了?why