index b84bf1c3dfac9a5574ab0a8833b77813f0fd2f0e..b93b2a0ffd6f3f3014cef4bedd5728f002f72f5d 100644 (file)
*
* The main difference between this routine and a bare PageAddItem call
* is that this code knows that the leftmost index tuple on a non-leaf
- * btree page doesn't need to have a key. Therefore, it strips such
- * tuples down to just the tuple header. CAUTION: this works ONLY if
- * we insert the tuples in order, so that the given itup_off does
- * represent the final position of the tuple!
+ * btree page has a key that must be treated as minus infinity.
+ * Therefore, it truncates away all attributes. CAUTION: this works
+ * ONLY if we insert the tuples in order, so that the given itup_off
+ * does represent the final position of the tuple!
*/
static bool
_bt_pgaddtup(Page page,
{
trunctuple = *itup;
trunctuple.t_info = sizeof(IndexTupleData);
- /* Deliberately zero INDEX_ALT_TID_MASK bits */
BTreeTupleSetNAtts(&trunctuple, 0);
itup = &trunctuple;
itemsize = sizeof(IndexTupleData);
index c11a3fb570d4d9a8ba5b03d66ee59fd69ddf367a..fc7d43a0f310660fcc920abba1eb936bef71e1e0 100644 (file)
* Add an item to a page being built.
*
* The main difference between this routine and a bare PageAddItem call
- * is that this code knows that the leftmost data item on a non-leaf
- * btree page doesn't need to have a key. Therefore, it strips such
- * items down to just the item header.
+ * is that this code knows that the leftmost data item on a non-leaf btree
+ * page has a key that must be treated as minus infinity. Therefore, it
+ * truncates away all attributes.
*
* This is almost like nbtinsert.c's _bt_pgaddtup(), but we can't use
* that because it assumes that P_RIGHTMOST() will return the correct
{
trunctuple = *itup;
trunctuple.t_info = sizeof(IndexTupleData);
- /* Deliberately zero INDEX_ALT_TID_MASK bits */
BTreeTupleSetNAtts(&trunctuple, 0);
itup = &trunctuple;
itemsize = sizeof(IndexTupleData);