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

Re: Locale problem with psqlODBC under Fedora 16

From: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
To: Zoltan Boszormenyi <zb(at)cybertec(dot)at>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Locale problem with psqlODBC under Fedora 16
Date: 2011-11-07 23:53:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
Hi Zoltan,

(2011/11/06 12:49), Zoltan Boszormenyi wrote:
> Hi,
> 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:
>      SQLBindParameter(hStmt,13,
>        (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
> megr=1,fpont=1478,csopvez=79,datum='2011-09-05'::date,d1='2011-09-04'::date,t1='21:30:00'::time,d2='2011-09-05'::date,t2='03:00:00'::time,temp=113,n_beepites=1,n_sikeres=1,kutfejnyomas='300',co2='99,47',h2sppm=0,hibajel=E''
> where id=2805;

OK I would try to fix it.
Please wait for a day or so.

Inoue, Hiroshi

> 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

In response to


pgsql-odbc by date

Next:From: Dave PageDate: 2011-11-08 08:52:44
Subject: Re: 9.1 driver status
Previous:From: Devrim GÜNDÜZDate: 2011-11-07 20:05:31
Subject: Re: 9.1 driver status

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