Prevent CRLF conversion of inputs in json_parser test module
authorAndrew Dunstan
Tue, 9 Jul 2024 21:29:48 +0000 (17:29 -0400)
committerAndrew Dunstan
Tue, 9 Jul 2024 21:34:47 +0000 (17:34 -0400)
commite72f787ea6b287ed624c1f5be71eb13e405b1577
tree774ccab7ef38f068e43a9057232064b641641bb1
parentd3e076549b99d1130053223adb9c1fa909d75dc0
Prevent CRLF conversion of inputs in json_parser test module

Do this by opening the file in PG_BINARY_R mode. This prevents us from
getting wrong byte count from stat().

Per complaint from Andres Freund

Discussion: https://postgr.es/m/20240707052030[email protected]

Backpatch to rlease 17 where this code was introduced
src/test/modules/test_json_parser/test_json_parser_incremental.c
src/test/modules/test_json_parser/test_json_parser_perf.c