Improve logging of bad parameter values in BIND messages.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 1ea396362be1615e926ea69d666c770081a0d3ef
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2021-03-16T15:16:41Z
Releases: 14.0
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

Files

PathChange+/−
src/backend/tcop/postgres.c modified +91 −3
src/bin/pgbench/t/001_pgbench_with_server.pl modified +16 −0

Discussion