Improve logging of bad parameter values in BIND messages.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 16 Mar 2021 15:16:41 +0000 (11:16 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 16 Mar 2021 15:16:41 +0000 (11:16 -0400)
commit1ea396362be1615e926ea69d666c770081a0d3ef
treeb843c6b8aa55194d798a066a50ec45138a0d1626
parent015061690c6526ff9f9f7af2940e1c1541654b68
Improve logging of bad parameter values in BIND messages.

Since commit ba79cb5dc, values of bind parameters have been logged
during errors in extended query mode.  However, we only did that after
we'd collected and converted all the parameter values, thus failing to
offer any useful localization of invalid-parameter problems.  Add a
separate callback that's used during parameter collection, and have it
print the parameter number, along with the input string if text input
format is used.

Justin Pryzby and Tom Lane

Discussion: https://postgr.es/m/20210104170939.GH9712@telsasoft.com
Discussion: https://postgr.es/m/CANfkH5k-6nNt-4cSv1vPB80nq2BZCzhFVR5O4VznYbsX0wZmow@mail.gmail.com
src/backend/tcop/postgres.c
src/bin/pgbench/t/001_pgbench_with_server.pl