At Mon, 27 Aug 2018 19:38:19 -0700, Michael Paquier <mich...@paquier.xyz> wrote in <20180828023819.ga29...@paquier.xyz> > On Mon, Aug 27, 2018 at 02:34:31PM -0400, Robert Haas wrote: > > I like the direction of your thinking, but it seems to me that this > > would cause a problem if you want to set search_path=foo,bar. > > proconfig already handles such cases, that's what I was coming at. We > could reuse most of what it does, no?
IIUC, proconfig is a text array, options is a text, and the options psql-option is in the format of '-cvar=val -cvar=val...'. Thus I think we still need something to convert them. As an experiment, just with the following mod: contrib/postgres_fdw/option.c /* Hide debug options, as well as settings we override internally. */ - if (strchr(lopt->dispchar, 'D') || + if ((strchr(lopt->dispchar, 'D') && + strcmp(lopt->keyword, "options") != 0) || strcmp(lopt->keyword, "fallback_application_name") == 0 || and the following setup: =# alter server sv1 options (set options '-csearch_path=\\"hoge,hage\\"\\ -cwork_mem=16MB'); actually works. Converting array representation into the commandline options format shown above internally might make it look better a bit.. =# alter server sv1 options (set options '{"search_path=\"hoge,hage\"",work_mem=16MB}'); regards. -- Kyotaro Horiguchi NTT Open Source Software Center