Simplify truncate_query_log() callers truncate_query_log() returns NULL when statement truncation is disabled or the supplied query does not need to be truncated. Therefore, callers do not need to check log_statement_max_length before calling it.
Remove the redundant checks and let truncate_query_log() make the decision in one place. This simplifies the statement and duration logging code without changing its behavior. Author: Jim Jones <[email protected]> Reviewed-by: Fujii Masao <[email protected]> Discussion: https://postgr.es/m/CAHGQGwFOV+7nOdfoO=kfVH=-fra9aqe1ychhlyty3nfq9rq...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5594f209c3eff6e478e1d6109094f14b59bd3dce Modified Files -------------- src/backend/tcop/postgres.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-)
