mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Make 0x007f -> (unsigned)0x7f to make pgindent happy.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.41 1999/05/25 18:20:28 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.42 1999/05/25 22:04:11 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -68,6 +68,7 @@ _bt_doinsert(Relation rel, BTItem btitem, bool index_is_unique, Relation heapRel
|
||||
LockBuffer(buf, BT_WRITE);
|
||||
|
||||
l1:
|
||||
|
||||
/*
|
||||
* If the page was split between the time that we surrendered our read
|
||||
* lock and acquired our write lock, then this page may no longer be
|
||||
@@ -96,13 +97,13 @@ l1:
|
||||
/* key on the page before trying to compare it */
|
||||
if (!PageIsEmpty(page) && offset <= maxoff)
|
||||
{
|
||||
TupleDesc itupdesc;
|
||||
BTItem cbti;
|
||||
HeapTupleData htup;
|
||||
BTPageOpaque opaque;
|
||||
Buffer nbuf;
|
||||
BlockNumber nblkno;
|
||||
bool chtup = true;
|
||||
TupleDesc itupdesc;
|
||||
BTItem cbti;
|
||||
HeapTupleData htup;
|
||||
BTPageOpaque opaque;
|
||||
Buffer nbuf;
|
||||
BlockNumber nblkno;
|
||||
bool chtup = true;
|
||||
|
||||
itupdesc = RelationGetDescr(rel);
|
||||
nbuf = InvalidBuffer;
|
||||
@@ -155,7 +156,7 @@ l1:
|
||||
_bt_relbuf(rel, buf, BT_WRITE);
|
||||
XactLockTableWait(xwait);
|
||||
buf = _bt_getbuf(rel, blkno, BT_WRITE);
|
||||
goto l1; /* continue from the begin */
|
||||
goto l1;/* continue from the begin */
|
||||
}
|
||||
elog(ERROR, "Cannot insert a duplicate key into a unique index");
|
||||
}
|
||||
@@ -178,7 +179,7 @@ l1:
|
||||
nblkno = opaque->btpo_next;
|
||||
if (nbuf != InvalidBuffer)
|
||||
_bt_relbuf(rel, nbuf, BT_READ);
|
||||
for (nbuf = InvalidBuffer; ; )
|
||||
for (nbuf = InvalidBuffer;;)
|
||||
{
|
||||
nbuf = _bt_getbuf(rel, nblkno, BT_READ);
|
||||
page = BufferGetPage(nbuf);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.22 1999/05/25 18:20:29 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.23 1999/05/25 22:04:12 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Postgres btree pages look like ordinary relation pages. The opaque
|
||||
@@ -315,9 +315,10 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/*
|
||||
* Extend bufmgr code is unclean and so we have to
|
||||
* use locking here.
|
||||
* Extend bufmgr code is unclean and so we have to use locking
|
||||
* here.
|
||||
*/
|
||||
LockPage(rel, 0, ExclusiveLock);
|
||||
buf = ReadBuffer(rel, blkno);
|
||||
@@ -416,7 +417,7 @@ _bt_metaproot(Relation rel, BlockNumber rootbknum, int level)
|
||||
Assert(metaopaque->btpo_flags & BTP_META);
|
||||
metad = BTPageGetMeta(metap);
|
||||
metad->btm_root = rootbknum;
|
||||
if (level == 0) /* called from _do_insert */
|
||||
if (level == 0) /* called from _do_insert */
|
||||
metad->btm_level += 1;
|
||||
else
|
||||
metad->btm_level = level; /* called from btsort */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.39 1999/05/25 18:20:29 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.40 1999/05/25 22:04:13 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@@ -402,9 +402,9 @@ btgettuple(IndexScanDesc scan, ScanDirection dir)
|
||||
else
|
||||
res = _bt_first(scan, dir);
|
||||
|
||||
/*
|
||||
* Save heap TID to use it in _bt_restscan.
|
||||
* Unlock buffer before leaving index !
|
||||
/*
|
||||
* Save heap TID to use it in _bt_restscan. Unlock buffer before
|
||||
* leaving index !
|
||||
*/
|
||||
if (res)
|
||||
{
|
||||
@@ -565,7 +565,7 @@ btmarkpos(IndexScanDesc scan)
|
||||
if (ItemPointerIsValid(&(scan->currentItemData)))
|
||||
{
|
||||
so->btso_mrkbuf = ReadBuffer(scan->relation,
|
||||
BufferGetBlockNumber(so->btso_curbuf));
|
||||
BufferGetBlockNumber(so->btso_curbuf));
|
||||
scan->currentMarkData = scan->currentItemData;
|
||||
so->mrkHeapIptr = so->curHeapIptr;
|
||||
}
|
||||
@@ -594,7 +594,7 @@ btrestrpos(IndexScanDesc scan)
|
||||
if (ItemPointerIsValid(&(scan->currentMarkData)))
|
||||
{
|
||||
so->btso_curbuf = ReadBuffer(scan->relation,
|
||||
BufferGetBlockNumber(so->btso_mrkbuf));
|
||||
BufferGetBlockNumber(so->btso_mrkbuf));
|
||||
|
||||
scan->currentItemData = scan->currentMarkData;
|
||||
so->curHeapIptr = so->mrkHeapIptr;
|
||||
@@ -628,6 +628,7 @@ _bt_restscan(IndexScanDesc scan)
|
||||
BlockNumber blkno;
|
||||
|
||||
LockBuffer(buf, BT_READ);
|
||||
|
||||
/*
|
||||
* We use this as flag when first index tuple on page is deleted but
|
||||
* we do not move left (this would slowdown vacuum) - so we set
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.22 1999/05/25 18:20:30 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.23 1999/05/25 22:04:14 momjian Exp $
|
||||
*
|
||||
*
|
||||
* NOTES
|
||||
@@ -133,9 +133,10 @@ _bt_scandel(IndexScanDesc scan, BlockNumber blkno, OffsetNumber offno)
|
||||
ItemPointerSetInvalid(&(so->curHeapIptr));
|
||||
else
|
||||
{
|
||||
/*
|
||||
* We have to lock buffer before _bt_step
|
||||
* and unlock it after that.
|
||||
|
||||
/*
|
||||
* We have to lock buffer before _bt_step and unlock it after
|
||||
* that.
|
||||
*/
|
||||
LockBuffer(buf, BT_READ);
|
||||
_bt_step(scan, &buf, BackwardScanDirection);
|
||||
|
||||
Reference in New Issue
Block a user