Re: custom variable classes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: custom variable classes
Дата
Msg-id 6612.1164749558@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: custom variable classes  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: custom variable classes  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> How about we just compare that to the current definition source of the
>> value, and if we see it's been set improperly, revert the value to
>> default?

> Sounds interesting - can you expand on this a bit?

define_custom_variable() shouldn't just blindly accept the current
setting, but should check to see where it came from, and dig down to the
reset setting if the current source wouldn't have been allowed to set
the variable according to the now-known context.  (As noted in the
comments, that routine is a crock anyway, since it only tries to
transfer the "current" setting, not any stacked or reset settings.)

> Where is the wired-in default for a custom GUC var? This whole thing 
> needs some documentation, ISTM.

It appears to be whatever is the current content of the physical
variable at the instant DefineCustomFooVariable is called.  The whole
thing looks pretty poorly thought through, as well as undocumented...
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: custom variable classes
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Fix some translator comments so that