summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Geoghegan2025-01-13 17:15:00 +0000
committerPeter Geoghegan2025-01-13 17:15:00 +0000
commit597b1ffbf12352a3863a894f16741864aaf2242f (patch)
tree2324e63699b1e55edad903fc66bc8a44fe9def2a /src/include
parenta8a762bc46e43bfaf4c03fc50f805fdf53f11888 (diff)
Move nbtree preprocessing into new .c file.
Quite a bit of code within nbtutils.c is only called during nbtree preprocessing. Move that code into a new .c file, nbtpreprocesskeys.c. Also reorder some of the functions within the new file for clarity. This commit has no functional impact. It is strictly mechanical. Author: Peter Geoghegan <pg@bowt.ie> Suggested-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/CAH2-WznwNn1BDOpWxHBUK1f3Rdw8pO9UCenWXnvT=n9GO8GnLA@mail.gmail.com Discussion: https://postgr.es/m/86930045-5df5-494a-b4f1-815bc3fbcce0%40iki.fi
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/nbtree.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index b88bd443554..8dcfe5674c6 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -1261,6 +1261,11 @@ extern void _bt_pendingfsm_init(Relation rel, BTVacState *vstate,
extern void _bt_pendingfsm_finalize(Relation rel, BTVacState *vstate);
/*
+ * prototypes for functions in nbtpreprocesskeys.c
+ */
+extern void _bt_preprocess_keys(IndexScanDesc scan);
+
+/*
* prototypes for functions in nbtsearch.c
*/
extern BTStack _bt_search(Relation rel, Relation heaprel, BTScanInsert key,
@@ -1277,8 +1282,12 @@ extern Buffer _bt_get_endpoint(Relation rel, uint32 level, bool rightmost);
extern BTScanInsert _bt_mkscankey(Relation rel, IndexTuple itup);
extern void _bt_freestack(BTStack stack);
extern bool _bt_start_prim_scan(IndexScanDesc scan, ScanDirection dir);
+extern int _bt_binsrch_array_skey(FmgrInfo *orderproc,
+ bool cur_elem_trig, ScanDirection dir,
+ Datum tupdatum, bool tupnull,
+ BTArrayKeyInfo *array, ScanKey cur,
+ int32 *set_elem_result);
extern void _bt_start_array_keys(IndexScanDesc scan, ScanDirection dir);
-extern void _bt_preprocess_keys(IndexScanDesc scan);
extern bool _bt_checkkeys(IndexScanDesc scan, BTReadPageState *pstate, bool arrayKeys,
IndexTuple tuple, int tupnatts);
extern bool _bt_oppodir_checkkeys(IndexScanDesc scan, ScanDirection dir,