From: | Mahendra Singh Thalor <mahi6run(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | remove unnecessary explicit type conversion (to char) for appendStringInfoChar function calls |
Date: | 2025-04-11 17:36:48 |
Message-ID: | CAKYtNAraFpkJj7SxxAEpmnUMx464cXYGJbf=ovj7bqzz3+gMQw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
In the current master code, 3 places we are using appendStringInfoChar
call with explicit type conversion into char. This is not needed as
all other places, we are using direct character to append.
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -302,7 +302,7 @@ InteractiveBackend(StringInfo inBuf)
*/
/* Add '\0' to make it look the same as message case. */
- appendStringInfoChar(inBuf, (char) '\0');
+ appendStringInfoChar(inBuf, '\0');
Here, I am attaching a small patch to fix these 3 type conversions on head.
--
Thanks and Regards
Mahendra Singh Thalor
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
v01_remove-unnecessary-type-conversion-into-char-for-appendStringInfoChar.patch | application/octet-stream | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Nikita Malakhov | 2025-04-11 18:57:05 | Re: SQL/JSON json_table plan clause |
Previous Message | Peter Eisentraut | 2025-04-11 17:32:31 | Re: [PoC] Federated Authn/z with OAUTHBEARER |