From 40af897eb777bc8a6afca14195587e79e57a5c06 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Fri, 21 Feb 2025 09:18:49 +0900 Subject: [PATCH] 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 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); -- 2.39.5