mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Emit parameter values during query bind/execute errors
This makes such log entries more useful, since the cause of the error can be dependent on the parameter values. Author: Alexey Bashtanov, Álvaro Herrera Discussion: https://postgr.es/m/0146a67b-a22a-0519-9082-bc29756b93a2@imap.cc Reviewed-by: Peter Eisentraut, Andres Freund, Tom Lane
This commit is contained in:
@ -486,6 +486,7 @@ extern const struct config_enum_entry dynamic_shared_memory_options[];
|
||||
* GUC option variables that are exported from this module
|
||||
*/
|
||||
bool log_duration = false;
|
||||
bool log_parameters_on_error = false;
|
||||
bool Debug_print_plan = false;
|
||||
bool Debug_print_parse = false;
|
||||
bool Debug_print_rewritten = false;
|
||||
@ -1300,6 +1301,15 @@ static struct config_bool ConfigureNamesBool[] =
|
||||
false,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
{
|
||||
{"log_parameters_on_error", PGC_SUSET, LOGGING_WHAT,
|
||||
gettext_noop("Logs bind parameters of the logged statements where possible."),
|
||||
NULL
|
||||
},
|
||||
&log_parameters_on_error,
|
||||
false,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
{
|
||||
{"debug_print_parse", PGC_USERSET, LOGGING_WHAT,
|
||||
gettext_noop("Logs each query's parse tree."),
|
||||
|
Reference in New Issue
Block a user