pgsql: Improve coding of gistchoose and gistRelocateBuildBuffersOnSplit - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Improve coding of gistchoose and gistRelocateBuildBuffersOnSplit
Date
Msg-id E1T7HMW-0005aP-97@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Improve coding of gistchoose and gistRelocateBuildBuffersOnSplit.

This is mostly cosmetic, but it does eliminate a speculative portability
issue.  The previous coding ignored the fact that sum_grow could easily
overflow (in fact, it could be summing multiple IEEE float infinities).
On a platform where that didn't guarantee to produce a positive result,
the code would misbehave.  In any case, it was less than readable.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e5db11c5582b469c04a11f217a0f32c827da5dd7

Modified Files
--------------
src/backend/access/gist/gistbuildbuffers.c |   84 ++++++++++++--------
src/backend/access/gist/gistutil.c         |  113 +++++++++++++++-------------
2 files changed, 110 insertions(+), 87 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: Add Perl emacs formatting macros to src/tools/editors/emacs.samp
Next
From: Tom Lane
Date:
Subject: pgsql: Back-patch recent fixes for gistchoose and gistRelocateBuildBuff