pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Make Windows print float exponents like everybody else?
Date: Fri, 12 Oct 2018 15:55:07 -0400
Message-ID: <18890.1539374107@sss.pgh.pa.us> (raw)
In-Reply-To: <20181009220539.ofeodw344niy5rsb@alap3.anarazel.de>
References: <2934.1539122454@sss.pgh.pa.us>
	<20181009220539.ofeodw344niy5rsb@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> On 2018-10-09 18:00:54 -0400, Tom Lane wrote:
>>> Also, we have quite a few variant expected-files that exist only to cater
>>> for Windows' habit of printing three exponent digits where everybody else
>>> prints just two.  It struck me that it would not be hard, or expensive,
>>> to undo that choice in snprintf.c (see attached untested patch).  So we
>>> could considerably reduce future maintenance pain for the affected tests
>>> by getting rid of those files.

> No pushback here. Lower likelihood of turning the buildfarm red, lower
> likelihood of being embarrased. Good. ;)

Some (but curiously, not all) of the Windows critters are unhappy with
the fact that I removed the extra expected files for the ECPG tests.
In retrospect, the reason is obvious: the ECPG test programs do not
include port.h nor link with src/common, so they're not using our
custom printf, just the platform native one.

I could just revert the ECPG aspects of that commit, but considering
that it seems like everything else works, it's annoying to still need
extra expected files for ECPG.

What I'm now thinking about is modifying the three affected test
programs so that they internally strip the extra zero using the
same logic as in snprintf.c.  It'd be slightly more work but
might be worth it in the long run.  On the other hand, we hardly
ever touch the ECPG tests anyway, so maybe it isn't?

			regards, tom lane




view thread (3+ messages)

Message-ID: <18890.1539374107@sss.pgh.pa.us>
Permalink:  ../18890.1539374107@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18890.1539374107@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: Make Windows print float exponents like everybody else?
  In-Reply-To: <18890.1539374107@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox