Обсуждение: Re: port/snprintf.c (was Re: Numeric 508 datatype)
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> The problems are sufficiently bad that it might be a good idea to
>> backport the fixes into 8.0 and before as well --- but I note that
>> the ABI is different (pg_snprintf vs snprintf, etc) so this requires
>> a bit of investigation rather than just committing the file as-is.
> Not as many 8.0.X platforms used *printf because we didn't test %$ for
> its use on that release, so my bet is that very few platforms would be
> using it.
Hm. One of the main problems I found was incorrect results for
LONGLONG_MIN (-2^63). I'm rather tempted to add a test case for
that to the int8 regression test and see if any platforms fail ;-)
regards, tom lane
I wrote:
> Hm. One of the main problems I found was incorrect results for
> LONGLONG_MIN (-2^63). I'm rather tempted to add a test case for
> that to the int8 regression test and see if any platforms fail ;-)
Done ... let me know whether the back branches still pass regression
for you ;-)
regards, tom lane
Tom Lane wrote: > I wrote: > > Hm. One of the main problems I found was incorrect results for > > LONGLONG_MIN (-2^63). I'm rather tempted to add a test case for > > that to the int8 regression test and see if any platforms fail ;-) > > Done ... let me know whether the back branches still pass regression > for you ;-) I checked back to 7.3 and everything passed. I did a cvs update, configure, gmake, and regression run for each branch. -- 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
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> Done ... let me know whether the back branches still pass regression
>> for you ;-)
> I checked back to 7.3 and everything passed. I did a cvs update,
> configure, gmake, and regression run for each branch.
[ digs a bit deeper... ] Actually, it appears that that bug didn't
exist before 8.1; it was introduced here:
2005-03-16 22:18 momjian
* src/port/snprintf.c: Factor duplicate snprintf code into
functions.
by an ill-considered removal of an unsigned local variable.
regards, tom lane