On 1/11/18 17:01, Peter Eisentraut wrote:
> Looking around where else they are used, the uses in numeric.c sure seem
> like noops:
> 
> #if SIZEOF_DATUM == 8
> #define NumericAbbrevGetDatum(X) ((Datum) SET_8_BYTES(X))
> #define DatumGetNumericAbbrev(X) ((int64) GET_8_BYTES(X))
> #define NUMERIC_ABBREV_NAN      NumericAbbrevGetDatum(PG_INT64_MIN)
> #else
> #define NumericAbbrevGetDatum(X) ((Datum) SET_4_BYTES(X))
> #define DatumGetNumericAbbrev(X) ((int32) GET_4_BYTES(X))
> #define NUMERIC_ABBREV_NAN      NumericAbbrevGetDatum(PG_INT32_MIN)
> #endif
> 
> We can just replace these by straight casts, too.

I have committed a change for this.  I'll work through the other details
later.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Reply via email to