Er ... does port/snprintf.c actually work?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Er ... does port/snprintf.c actually work?
Дата
Msg-id 9381.1133723848@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
I started to do some simple testing of snprintf.c after doing the
cleanup work I had in mind, and soon found that neither my version
nor the original actually do parameter reordering correctly:

$ ./testf 'abc%2$sfoo%1$s' DEF GHI
sys:
abcGHIfooDEF            <--- looks right to me
ours:
abcDEFfooGHI            <--- wrong
done

I haven't dug into this too closely yet (offhand I think the problem
is that the loop at line 541ff is searching fmtpar[] and then using
fmtparptr[]) but was wondering why it hadn't been noticed before.
Which of our platforms actually use port/snprintf.c, and hasn't anyone
tried any of the internationalized message databases on one?
        regards, tom lane


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

Предыдущее
От: Paul Lindner
Дата:
Сообщение: MIN() performance regression 8.0 -> 8.1
Следующее
От: Kevin Brown
Дата:
Сообщение: Re: Reducing relation locking overhead