git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 037f841)
Remove some dead code, per Heikki.
Tue, 6 Feb 2007 14:55:11 +0000 (14:55 +0000)
Tue, 6 Feb 2007 14:55:11 +0000 (14:55 +0000)

diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c
index 0a7414869309120b616ba6067116333e82f8dcb9..a743da1cc444d1e65ac00f5eb023a9371c47b07e 100644 (file)
--- a/src/backend/access/nbtree/nbtinsert.c
+++ b/src/backend/access/nbtree/nbtinsert.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.148 2007年01月27日 20:53:30 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.149 2007年02月06日 14:55:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -855,22 +855,17 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright,
/* cope with possibility that newitem goes at the end */
if (i <= newitemoff)
{
- if (newitemonleft)
- {
- _bt_pgaddtup(rel, leftpage, newitemsz, newitem, leftoff,
- "left sibling");
- itup_off = leftoff;
- itup_blkno = BufferGetBlockNumber(buf);
- leftoff = OffsetNumberNext(leftoff);
- }
- else
- {
- _bt_pgaddtup(rel, rightpage, newitemsz, newitem, rightoff,
- "right sibling");
- itup_off = rightoff;
- itup_blkno = BufferGetBlockNumber(rbuf);
- rightoff = OffsetNumberNext(rightoff);
- }
+ /*
+ * Can't have newitemonleft here; that would imply we were told to put
+ * *everything* on the left page, which cannot fit (if it could, we'd
+ * not be splitting the page).
+ */
+ Assert(!newitemonleft);
+ _bt_pgaddtup(rel, rightpage, newitemsz, newitem, rightoff,
+ "right sibling");
+ itup_off = rightoff;
+ itup_blkno = BufferGetBlockNumber(rbuf);
+ rightoff = OffsetNumberNext(rightoff);
}
/*
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /