]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix incorrect error message for IDENTIFY_SYSTEM
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Tue, 5 Dec 2023 13:30:56 +0000 (14:30 +0100)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Tue, 5 Dec 2023 13:30:56 +0000 (14:30 +0100)
commit1ce2986795eb6ac4de32da835087ea1d486fbfa3
treeea55b20706ceb71ad57d08b7dd442f0f3ffa9b1e
parentff186ea84de422e6c509e3e1dcf66530dae47595
Fix incorrect error message for IDENTIFY_SYSTEM

Commit 5a991ef8692e accidentally reversed the order of the tuples
and fields parameters, making the error message incorrectly refer
to 3 tuples with 1 field when IDENTIFY_SYSTEM returns 1 tuple and
3 or 4 fields. Fix by changing the order of the parameters.  This
also adds a comment describing why we check for < 3 when postgres
since 9.4 has been sending 4 fields.

Backpatch all the way since the bug is almost a decade old.

Author: Tomonari Katsumata <t.katsumata1122@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Bug: #18224
Backpatch-through: v12
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c