Re: GUC names in messages

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: GUC names in messages
Дата
Msg-id ZWgkuTmMItANLpnU@paquier.xyz
обсуждение исходный текст
Ответ на Re: GUC names in messages  (Peter Smith <smithpb2250@gmail.com>)
Ответы Re: GUC names in messages  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Re: GUC names in messages  (Peter Smith <smithpb2250@gmail.com>)
Re: GUC names in messages  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: GUC names in messages  (Peter Eisentraut <peter@eisentraut.org>)
Список pgsql-hackers
On Tue, Nov 28, 2023 at 11:54:33AM +1100, Peter Smith wrote:
> Here is patch set v3.
>
> Patches 0001 and 0002 are unchanged from v2.

After some grepping, I've noticed that 0002 had a mistake with
track_commit_timestamp: some alternate output of modules/commit_ts/
was not updated.  meson was able to reproduce the failure as well.

I am not sure regarding what we should do a mixed cases as well, so I
have discarded DateStyle for now, and applied the rest.

Also applied 0001 from Alvaro.

> Patch 0003 now uses a "%s%s%s" format specifier with GUC_FORMAT macro
> in guc.c, as recently suggested by Michael [1].

I cannot think about a better idea as these strings need to be
translated so they need three %s.

+        if (*p == '_')
+            underscore = true;
+        else if ('a' <= *p && *p <= 'z')
+            lowercase = true;

An issue with this code is that it would forget to quote GUCs that use
dots, like the ones from an extension.  I don't really see why we
cannot just make the macro return true only if all the characters of a
GUC name is made of lower-case alpha characters?

With an extra indentation applied, I finish with the attached for
0003.
--
Michael

Вложения

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: possibility to define only local cursors
Следующее
От: Haotian Chen
Дата:
Сообщение: Dumped SQL failed to execute with ERROR "GROUP BY position -1 is not in select list"