Unix Technical Forum

Weird ecpg failures on buildfarm NetBSD members

This is a discussion on Weird ecpg failures on buildfarm NetBSD members within the pgsql Hackers forums, part of the PostgreSQL category; --> Today's puzzler for the curious: Last night the buildfarm reported two ECPG-Check failures http://www.pgbuildfarm.org/cgi-bin/s...-08%2017:30:00 http://www.pgbuildfarm.org/cgi-bin/s...-08%2017:30:01 which promptly went away ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 08:51 PM
Tom Lane
 
Posts: n/a
Default Weird ecpg failures on buildfarm NetBSD members

Today's puzzler for the curious:

Last night the buildfarm reported two ECPG-Check failures

http://www.pgbuildfarm.org/cgi-bin/s...-08%2017:30:00
http://www.pgbuildfarm.org/cgi-bin/s...-08%2017:30:01

which promptly went away again. Judging by the timestamps these must
have been induced by Joe's PQconnectionUsedPassword() patch and fixed by
my subsequent tweaking, but how the heck did that result in an ecpg
failure? I think that the cause must have had something to do with his
inclusion of postgres_fe.h into libpq-fe.h, which I took out on the
grounds that it was an unacceptable pollution of client code namespace.
But exactly why/how did that break ecpg, and why did the failure only
manifest on NetBSD machines?

I don't really have time to investigate this, but would like to know
what happened.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 08:54 PM
Kris Jurka
 
Posts: n/a
Default Re: Weird ecpg failures on buildfarm NetBSD members



On Mon, 9 Jul 2007, Tom Lane wrote:

> Today's puzzler for the curious:
>
> Last night the buildfarm reported two ECPG-Check failures
>
> http://www.pgbuildfarm.org/cgi-bin/s...-08%2017:30:00
> http://www.pgbuildfarm.org/cgi-bin/s...-08%2017:30:01
>
> which promptly went away again. Judging by the timestamps these must
> have been induced by Joe's PQconnectionUsedPassword() patch and fixed by
> my subsequent tweaking, but how the heck did that result in an ecpg
> failure? I think that the cause must have had something to do with his
> inclusion of postgres_fe.h into libpq-fe.h, which I took out on the
> grounds that it was an unacceptable pollution of client code namespace.
> But exactly why/how did that break ecpg, and why did the failure only
> manifest on NetBSD machines?
>


It turns out that this failure was caused by pulling in pg's own printf
implementation to the resulting ECPG program. The failing test
(dyntest.pgc) prints its output using:

printf ("%.*f\n", PRECISION, DOUBLEVAR);

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

This would only happen on machines where we don't use the system
provided printf which is why it was only seen on NetBSD although in could
have been seen on mingw as well.

Kris Jurka


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 08:54 PM
Tom Lane
 
Posts: n/a
Default Re: Weird ecpg failures on buildfarm NetBSD members

Kris Jurka <books@ejurka.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

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:39 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com