Skip site navigation (1) Skip section navigation (2)

Locale problem with psqlODBC under Fedora 16

From: Zoltan Boszormenyi <zb(at)cybertec(dot)at>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Locale problem with psqlODBC under Fedora 16
Date: 2011-11-06 03:49:29
Message-ID: (view raw or whole thread)
Lists: pgsql-odbc

I just installed Fedora 16 and it has PostgreSQL 9.1.1 and
postgresql-odbc-09.00.0200 (which is psqlODBC).

My problem comes from this code:

      (SQLPOINTER)&co2, sizeof(co2), NULL);

New value of "co2" is 99.47 but as my Hungarian locale uses comma
instead of dot for a decimal separator, this pops up:

ERROR:  invalid input syntax for type numeric: "99,47" at character 210
STATEMENT:  update al set
where id=2805;

With my previous system when this code was used (PostgreSQL 8.2,
psqlodbc-08.02.xxxx era), the above code worked.

convert.c in psqlODBC hasn't changed much with regard to floating point
handling so it still uses setlocale() to  switch to "C" locale and I also
recompiled the SRPM for Fedora 16 and config.h indeed contains
"#define HAVE_LOCALE_H 1" so the relevant code with setlocale() gets
compiled in. Still, something broke the locales where something else than
a decimal-dot is used for decimal separator.

Best regards,
Zoltán Böszörményi

Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria


pgsql-odbc by date

Next:From: tamanna madaanDate: 2011-11-06 06:44:12
Subject: SQLDriverConnect function call hangs
Previous:From: noreplyDate: 2011-11-02 00:13:01
Subject: [ psqlodbc-Bugs-1009575 ] MS QUERY fails for multi table query

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group