Re: [PATCHES] guc
От | Liam Stewart |
---|---|
Тема | Re: [PATCHES] guc |
Дата | |
Msg-id | 20020118120059.A23383@redhat.com обсуждение исходный текст |
Ответ на | Re: [PATCHES] guc (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [PATCHES] guc
|
Список | pgsql-hackers |
On Thu, Jan 17, 2002 at 05:57:29PM -0500, Tom Lane wrote: > Peter Eisentraut <peter_e@gmx.net> writes: > > Liam Stewart writes: > >> I've removed > >> GetConfigOption() and replaced it with ShowConfigOption() which does an > >> elog(NOTICE) instead of returning a string. > > > I certainly don't like that. I want to be able to get at the > > configuration setting without any notice going off. > > I agree with Peter --- better to separate the getting of the string > from displaying it. What's the reason for collapsing them together? I ended up thinking that GetConfigOption was a bit useless right now since, with the redone GetPGVariable, there's currently nothing that would use it. I can see some use for it since not all guc options have an associated variable but still have a value (e.g.: seed, server_encoding). How about I add GetConfigOption back in and change ShowConfigOption to use it. display_proc hooks would return a char *; GetConfigOption would use a variable's display_proc hook if it is non-null instead of doing its own thing. ShowConfigOption would no longer call a variable's display_proc hook. > > I wouldn't use a printf format string at all. > > Good point. If we have to set up a checking mechanism then we should > ask ourselves why we're bothering to use printf representation. I was going on the fact that printf format string was on the todo and that Tom suggested using them last February. When thinking about parsing printf strings, I realized how not nice it would be, so I'm alright with a new representation. > > What I would like to get out of the configurability of floating-point > > numbers is: > > 1. The ability to dump them in binary or hex format for lossless > > dump/reload. (printf("%a") does that.) > > On some platforms... I'd be happier with this if it were more portable... Roll our own? %a and %A are C99 so are much less portable than most other printf conversion specifiers. Liam -- Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com
В списке pgsql-hackers по дате отправления: