Fix typo in comments.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Sat, 10 Dec 2022 06:23:30 +0000 (15:23 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Sat, 10 Dec 2022 06:23:30 +0000 (15:23 +0900)
src/protocol/pool_proto_modules.c

index 255cc4fad6749a7b680779fa78c9ac5531d4a502..81ef4af9e321e626a0f108a4fa79899df05e65cd 100644 (file)
@@ -1792,7 +1792,7 @@ Close(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backend,
                                 errmsg("unable to execute close, invalid message")));
 
        /*
-        * As per the postgresql, calling close on non existing portals or
+        * For PostgreSQL, calling close on non existing portals or
         * statements is not an error. So on the same footings we will ignore all
         * such calls and return the close complete message to clients with out
         * going to backend
@@ -1844,8 +1844,9 @@ Close(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backend,
                /*
                 * Parse_before_bind() may have sent a bind message to the primary
                 * node id. So send the close message to the primary node as well.
-                * Even if not, sending a close message for non existing
-                * statement/portal is harmless. No error will happen.
+                * Even if we do not send the bind message, sending a close message
+                * for non existing statement/portal is harmless. No error will
+                * happen.
                 */
                if (session_context->load_balance_node_id != PRIMARY_NODE_ID)
                {
@@ -3642,8 +3643,8 @@ static POOL_STATUS parse_before_bind(POOL_CONNECTION * frontend,
                         * Before sending the parse message to the primary, we need to
                         * close the named statement. Otherwise we will get an error from
                         * backend if the named statement already exists. This could
-                        * happened if parse_before_bind is called with a bind message
-                        * using same named statement. If the named statement does not
+                        * happen if parse_before_bind is called with a bind message
+                        * using the same named statement. If the named statement does not
                         * exist, it's fine. PostgreSQL just ignores a request trying to
                         * close a non-existing statement. If the statement is unnamed
                         * one, we do not need it because unnamed statement can be
@@ -3656,6 +3657,7 @@ static POOL_STATUS parse_before_bind(POOL_CONNECTION * frontend,
                                        (errmsg("parse before bind"),
                                         errdetail("close statement: %s", bind_message->contents + offset)));
 
+                       /* named statement? */
                        if (bind_message->contents[offset] != '\0')
                        {
                                message_len = 1 + strlen(bind_message->contents + offset) + 1;