solution! (was: Re: problem with float8 input format)

From: Louis-David Mitterrand <cunctator(at)apartia(dot)ch>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: solution! (was: Re: problem with float8 input format)
Date: 2000-08-12 14:57:17
Message-ID: 20000812165717.A9065@styx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Fri, Aug 11, 2000 at 10:07:39PM +0200, Louis-David Mitterrand wrote:
> On Fri, Aug 11, 2000 at 11:42:06AM -0400, Tom Lane wrote:
> > Louis-David Mitterrand <cunctator(at)apartia(dot)ch> writes:
> > > Strangely engough the function call works fine when called from psql but
> > > fails (but not always!) from a C trigger.
> >
> > May we see the C trigger? I'm suspicious it's doing something wrong...
> >
>
> Please find the trigger attached to this message as well as the .sql
> file containing the full DB schema including the functions. Here is a
> typicall log entry of the error:

Finally I found the problem:

bindtextdomain("apartia_com", "/usr/local/auction/locale");
textdomain("apartia_com");
setlocale(LC_ALL, seller_locale);

When "seller_locale" is, for instance, "de_DE", then I get theses
errors:

ERROR: Bad float8 input format '0.05'

Is Postgres expecting the float as 0,05 (notice the comma) because of
the locale?

When "seller_locale" is "en_US" all is well.

(C trigger is attached)

--
Louis-David Mitterrand - ldm(at)apartia(dot)org - http://www.apartia.org

"When I give food to the poor I am called a saint, when I ask why
they go hungry I am called a communist"
--Bishop Helder Camara

Attachment Content-Type Size
bid_control.c text/x-csrc 13.3 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Highway80 dude 2000-08-12 15:23:58 Re:
Previous Message Louis-David Mitterrand 2000-08-12 09:48:13 Re: problem with float8 input format

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-08-12 16:15:26 Re: solution! (was: Re: problem with float8 input format)
Previous Message Louis-David Mitterrand 2000-08-12 09:48:13 Re: problem with float8 input format