Re: Remove unnecessary static type qualifiers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Remove unnecessary static type qualifiers
Дата
Msg-id 3977290.1744121615@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Remove unnecessary static type qualifiers  (Junwang Zhao <zhjwpku@gmail.com>)
Список pgsql-hackers
Junwang Zhao <zhjwpku@gmail.com> writes:
> On Tue, Apr 8, 2025 at 4:29 PM Japin Li <japinli@hotmail.com> 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



В списке pgsql-hackers по дате отправления: