Removing variant expected-output files for float-output differences

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Subject: Removing variant expected-output files for float-output differences
Date: 2018-10-08 18:01:27
Message-ID: 29037.1539021687@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In the wake of commit 6eb3eb577, I believe we have no remaining buildfarm
animals that don't handle minus zero per spec. gaur is the only one that
was failing on the minus-zero-dependent geometry test cases introduced by
a3d284485, and I've already verified that this makes it pass again.

I think therefore that we ought to remove the variant regression test
output files that are there only to cater for failing to print minus zero
as such. AFAICT the ones meeting that description are numerology_1.out
and float8-small-is-zero_1.out. If we keep them, we're morally obliged
to also cater for no-minus-zero in the geometry tests, and I don't think
we really want to, especially if we have no way to verify the variant
file.

(It might also be interesting to see what happens if we remove geo_ops.c's
hacks to avoid minus zero results. But that's not what I'm on about
today.)

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.

As against that, Windows users might possibly complain that float output
looks different than they're used to. I'm not sure how much sympathy
I have for that position. If we reimplement float output for more speed,
as is under discussion in nearby threads, I doubt we'd trouble to preserve
this Windows-ism in the rewrite.

Comments?

regards, tom lane

Attachment Content-Type Size
suppress-windows-leading-zero-in-float-exponents.patch text/x-diff 1.1 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Jennifer Miller 2018-10-08 18:30:22 Percona is Seeking a PostgreSQL Consultant [North AMER based]
Previous Message Pavel Stehule 2018-10-08 17:42:44 Re: PostgreSQL 12, JIT defaults