mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Consolidate ItemPointer to Datum conversion functions
Instead of defining the same set of macros several times, define it once in an appropriate header file. In passing, convert to inline functions. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://www.postgresql.org/message-id/flat/844dd4c5-e5a1-3df1-bfaf-d1e1c2a16e45%40enterprisedb.com
This commit is contained in:
@ -50,8 +50,6 @@ PG_FUNCTION_INFO_V1(bt_multi_page_stats);
|
||||
|
||||
#define IS_INDEX(r) ((r)->rd_rel->relkind == RELKIND_INDEX)
|
||||
#define IS_BTREE(r) ((r)->rd_rel->relam == BTREE_AM_OID)
|
||||
#define DatumGetItemPointer(X) ((ItemPointer) DatumGetPointer(X))
|
||||
#define ItemPointerGetDatum(X) PointerGetDatum(X)
|
||||
|
||||
/* ------------------------------------------------
|
||||
* structure for single btree page statistics
|
||||
|
Reference in New Issue
Block a user