我正在实现PostgreSQL的驱动程序,并获取RowDescription
消息和一些DataRow
消息来响应数据库查询。但是,如何获取返回的列的类型?例如。第一栏应该是int
,第二栏应该是varchar(20)
。如何从RowDescription消息中看到PostgreSQL列类型?
下面是一些打印从RowDescription
:
[RowDescription] 2 rows
[Row] id
tableObjId: 16393
attrNr: 1
objId: 23
dataTypeSz: 4
typeModifier: -1
formatCode: 0
[Row] name
tableObjId: 16393
attrNr: 2
objId: 1043
dataTypeSz: -1
typeModifier: 24
formatCode: 0
,为DataRow
:
[DataRow] 2 columns
data: 2
data: Jonas
[DataRow] 2 columns
data: 76
data: Anders
有什么建议?这是我需要在任何系统表中查找的东西吗?