Re: Add %z support to elog/ereport?
От | Tom Lane |
---|---|
Тема | Re: Add %z support to elog/ereport? |
Дата | |
Msg-id | 29415.1390005755@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Add %z support to elog/ereport? (Andres Freund <andres@2ndquadrant.com>) |
Список | pgsql-hackers |
Andres Freund <andres@2ndquadrant.com> writes: > On 2014-01-17 13:50:08 -0500, Tom Lane wrote: >> I think a better solution approach is to teach our src/port/snprintf.c >> about the z flag, then extend configure's checking to force use of our >> snprintf if the platform's version doesn't handle z. > Hm. I had thought about that, but dismissed it because I thought people > would argue about it being too invasive... How so? It'd be a lot less invasive than what we'd have to do to use 'z' flags the other way. > If we're going there, we should just eliminate expand_fmt_string() from > elog.c and test for it in configure too, right? If you mean "let's rely on glibc for %m", the answer is "not bloody likely". See useful_strerror(), which is functionality we'd lose if we short-circuit that. >> You suggest below that we could invent some additional >> macros to support that; but since the "z" flag is in C99, there really >> ought to be only a small minority of platforms where it doesn't work. > Well, maybe just a minority numberwise, but one of them being windows > surely makes it count in number of installations... Agreed, but I believe we're already using src/port/snprintf.c on Windows because of lack of %n$ support (which is also required by C99). regards, tom lane
В списке pgsql-hackers по дате отправления: