Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contrib/btree_gist/btree_numeric.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ gbt_numeric_penalty(PG_FUNCTION_ARGS)
NumericGetDatum(us),
NumericGetDatum(os)));

if (numeric_is_nan(us))
if (NUMERIC_IS_NAN(us))
{
if (numeric_is_nan(os))
if (NUMERIC_IS_NAN(os))
*result = 0.0;
else
*result = 1.0;
Expand Down
4 changes: 2 additions & 2 deletions contrib/jsonb_plpython/jsonb_plpython.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,11 @@ PLyNumber_ToJsonbValue(PyObject *obj, JsonbValue *jbvNum)
* jsonb doesn't allow NaN or infinity (per JSON specification), so we
* have to reject those here explicitly.
*/
if (numeric_is_nan(num))
if (NUMERIC_IS_NAN(num))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("cannot convert NaN to jsonb")));
if (numeric_is_inf(num))
if (NUMERIC_IS_INF(num))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("cannot convert infinity to jsonb")));
Expand Down
6 changes: 3 additions & 3 deletions src/backend/cdb/cdblegacyhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ cdblegacyhash_numeric(PG_FUNCTION_ARGS)
size_t len; /* length for the data buffer */
uint32 hash;

if (numeric_is_nan(num))
if (NUMERIC_IS_NAN(num))
{
static const uint32 nanbuf = NAN_VAL;

Expand All @@ -387,8 +387,8 @@ cdblegacyhash_numeric(PG_FUNCTION_ARGS)
else
/* not a nan */
{
buf = numeric_digits(num);
len = numeric_len(num);
buf = NUMERIC_DIGITS(num);
len = NUMERIC_NDIGITS(num) * sizeof(NumericDigit);
}

/* do the hash using the selected algorithm */
Expand Down
2 changes: 1 addition & 1 deletion src/backend/gpopt/gpdbwrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,7 @@ gpdb::NumericIsNan(Numeric num)
{
GP_WRAP_START;
{
return numeric_is_nan(num);
return NUMERIC_IS_NAN(num);
}
GP_WRAP_END;
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/utils/adt/complex_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ numeric2complex(PG_FUNCTION_ARGS)
Numeric num = PG_GETARG_NUMERIC(0);
double float_num;

if (numeric_is_nan(num))
if (NUMERIC_IS_NAN(num))
{
float_num = get_float8_nan();
}
Expand Down
Loading