ecpg: Refactor ecpg_log() to skip unnecessary calls to ECPGget_sqlca().

Fujii Masao <fujii@postgresql.org>

Commit: 7c4d3fe272f3ab62b36f21e3fa6ae00751f00e31
Author: Fujii Masao <fujii@postgresql.org>
Date: 2024-10-22T14:57:35Z
Releases: 18.0
ecpg: Refactor ecpg_log() to skip unnecessary calls to ECPGget_sqlca().

Previously, ecpg_log() always called ECPGget_sqlca() to retrieve sqlca,
even though it was only needed for debug logging. This commit updates
ecpg_log() to call ECPGget_sqlca() only when debug logging is enabled.

Author: Yuto Sasaki
Reviewed-by: Alvaro Herrera, Tom Lane, Fujii Masao
Discussion: https://postgr.es/m/TY2PR01MB3628A85689649BABC9A1C6C3C1782@TY2PR01MB3628.jpnprd01.prod.outlook.com

Files

PathChange+/−
src/interfaces/ecpg/ecpglib/misc.c modified +3 −1

Discussion