pgpool2.git / summary / log / commit / refs
commit 89de3fc13cff897f2c599c4c2dd748b4f93f2d43
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Sat Dec 10 06:23:30 2022 +0000
Fix typo in comments.
src/protocol/pool_proto_modules.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/protocol/pool_proto_modules.c b/src/protocol/pool_proto_modules.c
index 255cc4fad..81ef4af9e 100644
--- a/src/protocol/pool_proto_modules.c
+++ b/src/protocol/pool_proto_modules.c
@@ -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;
[parent: 170c68ca626f]