summaryrefslogtreecommitdiff
path: root/contrib/btree_gist
diff options
context:
space:
mode:
authorPeter Eisentraut2022-08-28 08:47:10 +0000
committerPeter Eisentraut2022-09-05 11:30:44 +0000
commit6bcda4a72123c3aa29fa3f03d952095675ad4468 (patch)
treeccd9c5998367bb93509fce2a5c8c6bd49563f168 /contrib/btree_gist
parent6dc0738812c3fdbd733d917267a0543ab5fdf997 (diff)
Fix incorrect uses of Datum conversion macros
Since these macros just cast whatever you give them to the designated output type, and many normal uses also cast the output type further, a number of incorrect uses go undiscovered. The fixes in this patch have been discovered by changing these macros to inline functions, which is the subject of a future patch. Reviewed-by: Aleksander Alekseev <aleksander@timescale.com> Discussion: https://www.postgresql.org/message-id/flat/8528fb7e-0aa2-6b54-85fb-0c0886dbd6ed%40enterprisedb.com
Diffstat (limited to 'contrib/btree_gist')
-rw-r--r--contrib/btree_gist/btree_utils_num.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/btree_gist/btree_utils_num.c b/contrib/btree_gist/btree_utils_num.c
index 5632ee0586c..05c154afa34 100644
--- a/contrib/btree_gist/btree_utils_num.c
+++ b/contrib/btree_gist/btree_utils_num.c
@@ -153,7 +153,7 @@ gbt_num_fetch(GISTENTRY *entry, const gbtree_ninfo *tinfo)
datum = CashGetDatum(*(Cash *) entry->key);
break;
default:
- datum = PointerGetDatum(entry->key);
+ datum = entry->key;
}
retval = palloc(sizeof(GISTENTRY));