Re: Patch for str_numth() in PG 7.4
От | Alvaro Herrera |
---|---|
Тема | Re: Patch for str_numth() in PG 7.4 |
Дата | |
Msg-id | 20090113005046.GQ4919@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: Patch for str_numth() in PG 7.4 (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>) |
Ответы |
Re: Patch for str_numth() in PG 7.4
|
Список | pgsql-hackers |
Andreas 'ads' Scherbaum wrote: > > Hello all, > > On Mon, 12 Jan 2009 22:55:32 +0100 Andreas 'ads' Scherbaum wrote: > > > I tracked the problem done to the function str_numth() in > > src/backend/utils/adt/formatting.c. The fix (attached) is easy: i > > stole the function code from the latest 8.0 version which looks fare > > more sane in handling the string pointers. > > Now with the correct patch attached, thanks to anyone who pointed this > out ;-) This was fixed on 1.84 of formatting.c for 8.0 (but not backpatched for no apparent reason), which also changed some other stuff in that file. The complete patch is attached. revision 1.84 date: 2005-01-12 22:40:13 -0300; author: tgl; state: Exp; lines: +9 -7; branches: 1.84.4; Remove unportable assumption that it's okay to use the target buffer of an sprintf() as a source string. Demonstrably does not work with recent gcc and/or glibc on some platforms. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Вложения
В списке pgsql-hackers по дате отправления: