Re: [HACKERS] allowed user/db variables

Поиск
Список
Период
Сортировка
От Aizaz Ahmed
Тема Re: [HACKERS] allowed user/db variables
Дата
Msg-id 1059403288.19897.11.camel@toffee.toronto.redhat.com
обсуждение исходный текст
Ответ на Re: [HACKERS] allowed user/db variables  (Joe Conway <mail@joeconway.com>)
Список pgsql-patches
On Sun, 2003-07-27 at 01:29, Joe Conway wrote:
> Bruce Momjian wrote:
> > Patch applied.  Thanks.

>   /*
> !  * Used for pg_settings. Keep in sync with config_type enum in guc_tables.h
>    */
>   static char *config_type_name[] =
>   {
> ***************
> *** 176,181 ****
> --- 176,182 ----
>       "sighup",
>       "backend",
>       "super-user",
> +     "userlimit",
>       "user"
>   };

looks like there's some duplication between this array and the
static const char *const GucContext_names[] array in
src/backend/utils/misc/help_config.c

Is there some way we could have them both use the same array? (it
doesn't matter for help_config whether the names are upper- or
lower-case.)

Also, as a side note, I don't think Tom is a big fan of using comments
to indicate what needs to be kept in sync with what, if I can take the
liberty to quote him the last time a situation like this arose:


Re: [PATCHES] fix for new SUSET GUC variables
Mon, 14 Jul 2003 16:33:14 -0400

> We don't normally try to enumerate in comments all the places you'd
> need to change when adding to an enum or other widely-used
> definition.  You're supposed to find them by searching the source code
> for references to the existing values.  Depending on comments for that
> sort of thing is far too error-prone --- you can just about guarantee
> that the comment will fail to track new uses.

Thanks,
Aizaz


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] allowed user/db variables
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] allowed user/db variables