↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / 协议消息

TupleData (logical replication)

Logical replication TupleData format. Number of columns.

当前阅读 PG 18·选择有来源记录的版本

此版本暂无所选语言的定义,以下显示原始英文内容。

Layer
Logical replication payload; distinct from the frontend/backend message envelope
First field
Int16
manual path
/docs/18/protocol-logicalrep-message-formats.html
signature
TupleData

版本定义 PG 18

Int16

Number of columns.

Next, one of the following submessages appears for each published column:

Byte1('n')

Identifies the data as NULL value.

Or

Byte1('u')

Identifies unchanged TOASTed value (the actual value is not sent).

Or

Byte1('t')

Identifies the data as text formatted value.

Or

Byte1('b')

Identifies the data as binary formatted value.

Int32

Length of the column value.

Byten

The value of the column, either in binary or in text format. (As specified in the preceding format byte). n is the above length.

Fields in documented order

PositionFormatMeaning
1Int16Number of columns.
2Byte1('n')Identifies the data as NULL value.
3Byte1('u')Identifies unchanged TOASTed value (the actual value is not sent).
4Byte1('t')Identifies the data as text formatted value.
5Byte1('b')Identifies the data as binary formatted value.
6Int32Length of the column value.
7Byte nThe value of the column, either in binary or in text format. (As specified in the preceding format byte). n is the above length.

比较版本

完整来源事实

fields

map[description:Number of columns. format:Int16], map[description:Identifies the data as NULL value. format:Byte1('n')], map[description:Identifies unchanged TOASTed value (the actual value is not sent). format:Byte1('u')], map[description:Identifies the data as text formatted value. format:Byte1('t')], map[description:Identifies the data as binary formatted value. format:Byte1('b')], map[description:Length of the column value. format:Int32], map[description:The value of the column, either in binary or in text format. (As specified in the preceding format byte). n is the above length. format:Byte n]

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f

正文语言: en · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f