ECPGdo function in ecpglib sets LC_NUMERIC locale temporarily to C, to make sure it uses the '.' as the decimal separator for any numerics it sends to the backend. However, it fails to restore it back to the original locale in some error cases. I can see two returns from the function that neglect that, on lines 1776 and 1803 in execute.c. Attached is a test program to showcase the first of those. It produces this output for me: LC_NUMERIC before: fi_FI.utf8 number: 1,230000 LC_NUMERIC after: C number: 1.230000 -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
On Thu, Sep 01, 2011 at 02:27:07PM +0300, Heikki Linnakangas wrote: > ECPGdo function in ecpglib sets LC_NUMERIC locale temporarily to C, > to make sure it uses the '.' as the decimal separator for any > numerics it sends to the backend. However, it fails to restore it > back to the original locale in some error cases. I can see two > returns from the function that neglect that, on lines 1776 and 1803 > in execute.c. Fixed. Thanks for spotting this. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org Jabber: michael.meskes at googlemail dot com VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера