Re: take 2: show all / reset all - Mailing list pgsql-patches

From Tom Lane
Subject Re: take 2: show all / reset all
Date
Msg-id 12345.992039880@sss.pgh.pa.us
Whole thread Raw
In response to Re: take 2: show all / reset all  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: take 2: show all / reset all  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: take 2: show all / reset all  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> !     else if (strcasecmp(name, "all") == 0)
> !     {
> !         reset_DefaultXactIsoLevel();
> !         reset_XactIsoLevel();
> !         reset_random_seed();
> !         /* reset_server_encoding(); */
> !         reset_client_encoding();
> !         reset_datestyle();
> !         reset_timezone();
> !
> !         ResetAllOptions();
> !     } else

This looks fairly bogus, given the comment on ResetAllOptions:

/*
 * Reset all options to their specified default values. Should only be
 * called at program startup.
 */

Or is that OK now with the "makeDefault" addition to SetConfigOption?
Peter, your thoughts please?  (If it is OK, the patch needs to change
this comment.  Some additional commentary about what exactly the
makeDefault switch does would be appropriate too, since it's not real
clear exactly how "default" the value is becoming.)

I also wonder whether it's a good idea to reset the client encoding
here... it might be correct in a pure sense, but isn't it likely to
break the client?

            regards, tom lane

pgsql-patches by date:

Previous
From: Marko Kreen
Date:
Subject: Re: take 2: show all / reset all
Next
From: Bruce Momjian
Date:
Subject: Re: take 2: show all / reset all