Re: take 2: show all / reset all
От | Marko Kreen |
---|---|
Тема | Re: take 2: show all / reset all |
Дата | |
Msg-id | 20010607151044.A11601@l-t.ee обсуждение исходный текст |
Ответ на | Re: take 2: show all / reset all (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-patches |
On Thu, Jun 07, 2001 at 12:50:21AM -0400, Bruce Momjian wrote: > > > > Ok, now I am awake. How about this one? > > > > reset all: command line and .conf options change defaults > > on RESET ALL those are restored. > > > > show all: GUC + non-GUC. > > I have applied this patch with minor modifications to make it more > meaningful. I added meaningful default values if not set, and changed > function names of set/reset/parse_date to *_datestyle to match the > actual meaning of the value. Fine. > There is no clear distinction between set-able and non-setable because > RESET ALL just calls the GUC code to set variables as though the backend > was just starting up. Seems quite difficult to make that distinction in > the code and I am not sure it is worth it. It is not needed, as on non-SETable values will have value == default_val. Same goes for permissions, if user has no right to SET a value, the reset will do nothing. At least in my understanding it is ok already. Although - one thing that is worth adding is checking on RESET if var has changed - if not then do nothing. _And_ if it is, the RESET should go through set_, so the callbacks get called too (ATM they are not). This means splitting the set_config_option() up, set_config_option_real() should take then the actual record. The SHOW output should be reworked some time, but this is not possible until we have tuples-returning-funtions. -- marko
В списке pgsql-patches по дате отправления: