Remove unnecessary static type qualifiers

From: Japin Li <japinli(at)hotmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Remove unnecessary static type qualifiers
Date: 2025-04-08 08:29:04
Message-ID: ME0P300MB0445C44B2DEC2FC9CEFC23E1B6B52@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi, all

When I read the libpq source code, I found unnecessary static type qualifiers
in PQsetClientEncoding().

diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 0258d9ace3c..300ddfffd55 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -7717,7 +7717,7 @@ int
PQsetClientEncoding(PGconn *conn, const char *encoding)
{
char qbuf[128];
- static const char query[] = "set client_encoding to '%s'";
+ const char query[] = "set client_encoding to '%s'";
PGresult *res;
int status;

--
Regrads,
Japin Li

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ilia Evdokimov 2025-04-08 08:56:53 Re: track generic and custom plans in pg_stat_statements
Previous Message Ashutosh Bapat 2025-04-08 08:26:46 Re: [PATCH] clarify palloc comment on quote_literal_cstr