diff options
| author | Peter Eisentraut | 2017-04-05 14:44:23 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2017-04-06 18:41:09 +0000 |
| commit | 6f1b9aaae35bfabe2654a8e44ce226c91e7d8bd9 (patch) | |
| tree | 89c253c4c192e2177bcb602da258d3831490e0d4 /doc | |
| parent | 5f21f5292c0856536ac0724974a8bc6b296b9ef6 (diff) | |
Fix logical replication between different encodings
When sending a tuple attribute, the previous coding erroneously sent the
length byte before encoding conversion, which would lead to protocol
failures on the receiving side if the length did not match the following
string.
To fix that, use pq_sendcountedtext() for sending tuple attributes,
which takes care of all of that internally. To match the API of
pq_sendcountedtext(), send even text values without a trailing zero byte
and have the receiving end put it in place instead. This matches how
the standard FE/BE protocol behaves.
Reported-by: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/src/sgml/protocol.sgml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 5f971412ae..9d46d74113 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -6107,11 +6107,14 @@ TupleData </varlistentry> <varlistentry> <term> - String + Byte<replaceable>n</replaceable> </term> <listitem> <para> - The text value. + The value of the column, in text format. (A future release + might support additional formats.) + <replaceable>n</replaceable> is the above length. + </para> </listitem> </varlistentry> |
