mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Standard pgindent run for 8.1.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/hash/hashinsert.c,v 1.37 2005/08/10 21:36:45 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/hash/hashinsert.c,v 1.38 2005/10/15 02:49:08 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -50,8 +50,8 @@ _hash_doinsert(Relation rel, HashItem hitem)
|
||||
bool isnull;
|
||||
|
||||
/*
|
||||
* Compute the hash key for the item. We do this first so as not to
|
||||
* need to hold any locks while running the hash function.
|
||||
* Compute the hash key for the item. We do this first so as not to need
|
||||
* to hold any locks while running the hash function.
|
||||
*/
|
||||
itup = &(hitem->hash_itup);
|
||||
if (rel->rd_rel->relnatts != 1)
|
||||
@@ -64,12 +64,12 @@ _hash_doinsert(Relation rel, HashItem hitem)
|
||||
itemsz = IndexTupleDSize(hitem->hash_itup)
|
||||
+ (sizeof(HashItemData) - sizeof(IndexTupleData));
|
||||
|
||||
itemsz = MAXALIGN(itemsz); /* be safe, PageAddItem will do this but
|
||||
* we need to be consistent */
|
||||
itemsz = MAXALIGN(itemsz); /* be safe, PageAddItem will do this but we
|
||||
* need to be consistent */
|
||||
|
||||
/*
|
||||
* Acquire shared split lock so we can compute the target bucket
|
||||
* safely (see README).
|
||||
* Acquire shared split lock so we can compute the target bucket safely
|
||||
* (see README).
|
||||
*/
|
||||
_hash_getlock(rel, 0, HASH_SHARE);
|
||||
|
||||
@@ -79,9 +79,9 @@ _hash_doinsert(Relation rel, HashItem hitem)
|
||||
_hash_checkpage(rel, (Page) metap, LH_META_PAGE);
|
||||
|
||||
/*
|
||||
* Check whether the item can fit on a hash page at all. (Eventually,
|
||||
* we ought to try to apply TOAST methods if not.) Note that at this
|
||||
* point, itemsz doesn't include the ItemId.
|
||||
* Check whether the item can fit on a hash page at all. (Eventually, we
|
||||
* ought to try to apply TOAST methods if not.) Note that at this point,
|
||||
* itemsz doesn't include the ItemId.
|
||||
*/
|
||||
if (itemsz > HashMaxItemSize((Page) metap))
|
||||
ereport(ERROR,
|
||||
@@ -89,7 +89,7 @@ _hash_doinsert(Relation rel, HashItem hitem)
|
||||
errmsg("index row size %lu exceeds hash maximum %lu",
|
||||
(unsigned long) itemsz,
|
||||
(unsigned long) HashMaxItemSize((Page) metap)),
|
||||
errhint("Values larger than a buffer page cannot be indexed.")));
|
||||
errhint("Values larger than a buffer page cannot be indexed.")));
|
||||
|
||||
/*
|
||||
* Compute the target bucket number, and convert to block number.
|
||||
@@ -105,8 +105,7 @@ _hash_doinsert(Relation rel, HashItem hitem)
|
||||
_hash_chgbufaccess(rel, metabuf, HASH_READ, HASH_NOLOCK);
|
||||
|
||||
/*
|
||||
* Acquire share lock on target bucket; then we can release split
|
||||
* lock.
|
||||
* Acquire share lock on target bucket; then we can release split lock.
|
||||
*/
|
||||
_hash_getlock(rel, blkno, HASH_SHARE);
|
||||
|
||||
@@ -130,8 +129,8 @@ _hash_doinsert(Relation rel, HashItem hitem)
|
||||
if (BlockNumberIsValid(nextblkno))
|
||||
{
|
||||
/*
|
||||
* ovfl page exists; go get it. if it doesn't have room,
|
||||
* we'll find out next pass through the loop test above.
|
||||
* ovfl page exists; go get it. if it doesn't have room, we'll
|
||||
* find out next pass through the loop test above.
|
||||
*/
|
||||
_hash_relbuf(rel, buf);
|
||||
buf = _hash_getbuf(rel, nextblkno, HASH_WRITE);
|
||||
|
||||
Reference in New Issue
Block a user