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

From Bruce Momjian
Subject Re: take 2: show all / reset all
Date
Msg-id 200106082313.f58ND7107344@candle.pha.pa.us
Whole thread Raw
In response to Re: take 2: show all / reset all  (Tom Lane <tgl@sss.pgh.pa.us>)
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?

I assumed those were items not controlled by postgresql.conf like
isolation level.  Also, do we have a way to clear transaction state?  Is
BEGIN;COMMIT; the clean way to do it?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: take 2: show all / reset all
Next
From: Peter Eisentraut
Date:
Subject: Re: take 2: show all / reset all