Re: Weird ecpg failures on buildfarm NetBSD members

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Weird ecpg failures on buildfarm NetBSD members
Date: 2007-07-10 01:44:47
Message-ID: 3479.1184031887@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kris Jurka <books(at)ejurka(dot)com> writes:
> On Mon, 9 Jul 2007, Tom Lane wrote:
>> Today's puzzler for the curious:

> It turns out that this failure was caused by pulling in pg's own printf
> implementation to the resulting ECPG program.

Hah! Nice detective work, Kris.

> Calling printf("%.*f\n", -1, 14.7) results in "14" from pg_printf and
> "14.700000" from NetBSD's.

So does this represent a bug or shortcoming in pg_printf? A quick look
at the spec says that "A negative precision is taken as if the precision
were omitted", and rounding to int doesn't sound like the appropriate
behavior for bare %f.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message alexander lunyov 2007-07-10 04:40:24 Re: russian case-insensitive regexp search not working
Previous Message Kris Jurka 2007-07-10 01:17:51 Re: Weird ecpg failures on buildfarm NetBSD members