Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd91da5e

Browse files
committed
Remove useless use of bit-masking macros
In this case, the macros SET_8_BYTES(), GET_8_BYTES(), SET_4_BYTES(),GET_4_BYTES() are no-ops, so we can just remove them.The plan is to perhaps remove them from the source code altogether, sowe'll start here.Discussion:https://www.postgresql.org/message-id/5d51721a-69ef-2053-9172-599b539f0628@2ndquadrant.com
1 parent649aeb1 commitd91da5e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/backend/utils/adt/numeric.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,12 @@ typedef struct NumericSumAccum
354354
*/
355355
#defineNUMERIC_ABBREV_BITS (SIZEOF_DATUM * BITS_PER_BYTE)
356356
#ifSIZEOF_DATUM==8
357-
#defineNumericAbbrevGetDatum(X) ((Datum)SET_8_BYTES(X))
358-
#defineDatumGetNumericAbbrev(X) ((int64)GET_8_BYTES(X))
357+
#defineNumericAbbrevGetDatum(X) ((Datum) (X))
358+
#defineDatumGetNumericAbbrev(X) ((int64) (X))
359359
#defineNUMERIC_ABBREV_NAN NumericAbbrevGetDatum(PG_INT64_MIN)
360360
#else
361-
#defineNumericAbbrevGetDatum(X) ((Datum)SET_4_BYTES(X))
362-
#defineDatumGetNumericAbbrev(X) ((int32)GET_4_BYTES(X))
361+
#defineNumericAbbrevGetDatum(X) ((Datum) (X))
362+
#defineDatumGetNumericAbbrev(X) ((int32) (X))
363363
#defineNUMERIC_ABBREV_NAN NumericAbbrevGetDatum(PG_INT32_MIN)
364364
#endif
365365

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp