From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Try to fix portability issue in enum renumbering (again). |
Date: | 2016-08-31 17:58:06 |
Message-ID: | E1bf9m2-0000f5-Tc@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Try to fix portability issue in enum renumbering (again).
The hack embodied in commit 4ba61a487 no longer works after today's change
to allow DatumGetFloat4/Float4GetDatum to be inlined (commit 14cca1bf8).
Probably what's happening is that the faulty compilers are deciding that
the now-inlined assignment is a no-op and so they're not required to
round to float4 width.
We had a bunch of similar issues earlier this year in the degree-based
trig functions, and eventually settled on using volatile intermediate
variables as the least ugly method of forcing recalcitrant compilers
to do what the C standard says (cf commit 82311bcdd). Let's see if
that method works here.
Discussion: <4640(dot)1472664476(at)sss(dot)pgh(dot)pa(dot)us>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/65a588b4c3b06aefe0b00d6222598d4cff3542c2
Modified Files
--------------
src/backend/catalog/pg_enum.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-08-31 21:27:16 | pgsql: Improve memory management for PL/Tcl functions. |
Previous Message | Tom Lane | 2016-08-31 17:48:18 | Re: [COMMITTERS] pgsql: Use static inline functions for float <-> Datum conversions. |