Add braces for if block with large comment in psql's common.c
authorMichael Paquier <[email protected]>
Fri, 21 Feb 2025 00:18:49 +0000 (09:18 +0900)
committerMichael Paquier <[email protected]>
Fri, 21 Feb 2025 00:18:49 +0000 (09:18 +0900)
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 <[email protected]>
Discussion: https://postgr.es/m/CAO6_XqroE7JuMEm1sWz55rp9fAYX2JwmcP_3m_v51vnOFdsLiQ@mail.gmail.com

src/bin/psql/common.c

index f1a5291c13b026ad63f3ce23fc5d497fd036dbd2..2dd3739485aac0f8da36c9c9a809c1ff0ba0dde9 100644 (file)
@@ -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);