Tighten proto_version parsing in pgoutput

This is similar to 58ff4a0a0867, but this time for the parameter
"proto_version", when given as a parameter to pgoutput for logical
replication.  strtoul() lacked a check for an empty string, leading to
an inconsistent behavior depending on the platform.

The author has originally proposed a TAP test to check this empty value
pattern.  I have added a cheaper SQL query, instead, test_decoding
including a test area where this is possible.

Author: Tristan Partin <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/290bb8afe6b47adb8b080688bd97a710af351cb1

Modified Files
--------------
contrib/test_decoding/expected/replorigin.out | 4 ++++
contrib/test_decoding/sql/replorigin.sql      | 3 +++
src/backend/replication/pgoutput/pgoutput.c   | 5 +++--
3 files changed, 10 insertions(+), 2 deletions(-)

Reply via email to