pgsql: ecpg: Refactor ecpg_log() to skip unnecessary calls to ECPGget_s

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: ecpg: Refactor ecpg_log() to skip unnecessary calls to ECPGget_s
Date: 2024-10-22 14:58:42
Message-ID: E1t3GLK-001vDi-G2@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7c4d3fe272f3ab62b36f21e3fa6ae00751f00e31

Modified Files
--------------
src/interfaces/ecpg/ecpglib/misc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2024-10-22 15:36:31 pgsql: Improve parser's reporting of statement start locations.
Previous Message Álvaro Herrera 2024-10-22 14:26:01 pgsql: Restructure foreign key handling code for ATTACH/DETACH