mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Fix btmarkpos/btrestrpos to handle array keys.
This fixes another error in commit 9e8da0f757
.
I neglected to make the mark/restore functionality save and restore the
current set of array key values, which led to strange behavior if an
IndexScan with ScalarArrayOpExpr quals was used as the inner side of a
mergejoin. Per bug #7570 from Melese Tesfaye.
This commit is contained in:
@@ -535,6 +535,7 @@ typedef struct BTArrayKeyInfo
|
||||
{
|
||||
int scan_key; /* index of associated key in arrayKeyData */
|
||||
int cur_elem; /* index of current element in elem_values */
|
||||
int mark_elem; /* index of marked element in elem_values */
|
||||
int num_elems; /* number of elems in current array value */
|
||||
Datum *elem_values; /* array of num_elems Datums */
|
||||
} BTArrayKeyInfo;
|
||||
@@ -665,6 +666,8 @@ extern void _bt_freestack(BTStack stack);
|
||||
extern void _bt_preprocess_array_keys(IndexScanDesc scan);
|
||||
extern void _bt_start_array_keys(IndexScanDesc scan, ScanDirection dir);
|
||||
extern bool _bt_advance_array_keys(IndexScanDesc scan, ScanDirection dir);
|
||||
extern void _bt_mark_array_keys(IndexScanDesc scan);
|
||||
extern void _bt_restore_array_keys(IndexScanDesc scan);
|
||||
extern void _bt_preprocess_keys(IndexScanDesc scan);
|
||||
extern IndexTuple _bt_checkkeys(IndexScanDesc scan,
|
||||
Page page, OffsetNumber offnum,
|
||||
|
Reference in New Issue
Block a user