public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Junwang Zhao <[email protected]>
Cc: Japin Li <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Remove unnecessary static type qualifiers
Date: Tue, 08 Apr 2025 10:13:35 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAEG8a3JJS7_cwzYFL=+KktydA6bU_8ae+RkX64beGOsfJh86tg@mail.gmail.com>
References: <ME0P300MB0445C44B2DEC2FC9CEFC23E1B6B52@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM>
<CAEG8a3JJS7_cwzYFL=+KktydA6bU_8ae+RkX64beGOsfJh86tg@mail.gmail.com>
Junwang Zhao <[email protected]> writes:
> On Tue, Apr 8, 2025 at 4:29 PM Japin Li <[email protected]> wrote:
>> - static const char query[] = "set client_encoding to '%s'";
>> + const char query[] = "set client_encoding to '%s'";
> I doubt that, if you remove the *static*, it will allocate more memory
> on stack and need more instructions to copy the string to that area.
Yeah, it's not an improvement as written. This might be OK:
>> + const char *query = "set client_encoding to '%s'";
But I kinda doubt it's worth touching.
regards, tom lane
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Remove unnecessary static type qualifiers
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox