|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.148 2007/01/27 20:53:30 tgl Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.149 2007/02/06 14:55:11 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -855,22 +855,17 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright, |
855 | 855 | /* cope with possibility that newitem goes at the end */ |
856 | 856 | if (i <=newitemoff) |
857 | 857 | { |
858 | | -if (newitemonleft) |
859 | | -{ |
860 | | -_bt_pgaddtup(rel,leftpage,newitemsz,newitem,leftoff, |
861 | | -"left sibling"); |
862 | | -itup_off=leftoff; |
863 | | -itup_blkno=BufferGetBlockNumber(buf); |
864 | | -leftoff=OffsetNumberNext(leftoff); |
865 | | -} |
866 | | -else |
867 | | -{ |
868 | | -_bt_pgaddtup(rel,rightpage,newitemsz,newitem,rightoff, |
869 | | -"right sibling"); |
870 | | -itup_off=rightoff; |
871 | | -itup_blkno=BufferGetBlockNumber(rbuf); |
872 | | -rightoff=OffsetNumberNext(rightoff); |
873 | | -} |
| 858 | +/* |
| 859 | + * Can't have newitemonleft here; that would imply we were told to put |
| 860 | + * *everything* on the left page, which cannot fit (if it could, we'd |
| 861 | + * not be splitting the page). |
| 862 | + */ |
| 863 | +Assert(!newitemonleft); |
| 864 | +_bt_pgaddtup(rel,rightpage,newitemsz,newitem,rightoff, |
| 865 | +"right sibling"); |
| 866 | +itup_off=rightoff; |
| 867 | +itup_blkno=BufferGetBlockNumber(rbuf); |
| 868 | +rightoff=OffsetNumberNext(rightoff); |
874 | 869 | } |
875 | 870 |
|
876 | 871 | /* |
|