postgres.git / summary / log / commit / refs
commit 40af897eb777bc8a6afca14195587e79e57a5c06
Author: Michael Paquier <michael@paquier.xyz>
Date: Fri Feb 21 00:18:49 2025 +0000
First released in: 18.0
Add braces for if block with large comment in psql's common.c
A patch touching this area of the code is under review, and this format
makes the readability of the code slightly harder to parse.
Extracted from a larger patch by the same author.
Author: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Discussion: https://postgr.es/m/CAO6_XqroE7JuMEm1sWz55rp9fAYX2JwmcP_3m_v51vnOFdsLiQ@mail.gmail.com
src/bin/psql/common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index f1a5291c13b..2dd3739485a 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -1577,7 +1577,7 @@ ExecQueryAndProcessResults(const char *query,
if (result_status == PGRES_COPY_BOTH ||
result_status == PGRES_COPY_OUT ||
result_status == PGRES_COPY_IN)
-
+ {
/*
* For some obscure reason PQgetResult does *not* return a
* NULL in copy cases despite the result having been cleared,
@@ -1585,6 +1585,7 @@ ExecQueryAndProcessResults(const char *query,
* ignore manually.
*/
result = NULL;
+ }
else
result = PQgetResult(pset.db);
[parent: 2c53dec7f440]