Hi Kenny,
> The patch validates the result shape (>= 3 fields, exactly 1 row) before
> reading those fields and raises a protocol-violation error otherwise,
> mirroring what libpqrcv_identify_system() and the other result-consuming
> paths in this file already do. I used "< 3" rather than "< 4" because the
> function only reads fields 1 and 2.
Hmm, but IDENTIFY_SYSTEM requires that number returned attributes should be 3 or
4, nevertheless first and second columns are checked. If we follow, isn't it
better to require that there are 4 attributes? I checked old versions and the
command has returned 4 attributes from the beginning [1].
[1]:
https://github.com/postgres/postgres/blob/b1b8b8e6f141e378db21c609d8ee74d9125a4aca/src/backend/replication/walsender.c#L853
Best regards,
Hayato Kuroda
FUJITSU LIMITED