Re: snprintf causes regression tests to fail

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: snprintf causes regression tests to fail
Дата
Msg-id 200503020431.j224VJf16679@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: snprintf causes regression tests to fail  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > Tom Lane wrote:
> > >> Does it help if you flip the order of the snprintf and vsnprintf
> > >> functions in snprintf.c?
> >
> > > Yes, it fixes the problem and I have applied the reordering with a
> > > comment.
> >
> > Fascinating.
> >
> > > I will start working on fixing the large fmtpar allocations now.
> >
> > Quite honestly, this code is not worth micro-optimizing because it
> > is fundamentally broken.  See my other comments in this thread.
>
> I am working on something that just counts the '%' characters in the
> format string and allocates an array that size.
>
> > Can we find a BSD-license implementation that follows the spec?
>
> I would think NetBSD would be our best bet.  I will download it and take
> a look.

Oops, I remember now that NetBSD doesn't support it. I think FreeBSD does.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: snprintf causes regression tests to fail
Следующее
От: Robert Treat
Дата:
Сообщение: Re: logging as inserts