Don't use is_infinite() where isinf() will do.
Tom Lane <tgl@sss.pgh.pa.us>
Don't use is_infinite() where isinf() will do. Places that aren't testing for sign should not use the more expensive function; it's just wasteful, not to mention being a cognitive load for readers who may know what isinf() is but not is_infinite(). As things stand, we actually don't need is_infinite() anyplace except float4out/float8out, which means it could potentially go away altogether after the changes I proposed in <13178.1538794717@sss.pgh.pa.us>.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/formatting.c | modified | +2 −2 |
| src/backend/utils/adt/rangetypes_selfuncs.c | modified | +8 −6 |