aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2007-11-15 21:14:46 +0000
committerBruce Momjian <bruce@momjian.us>2007-11-15 21:14:46 +0000
commitfdf5a5efb7b28c13085fe7313658de8d7b9914f6 (patch)
treea75cf1422fa1eef4e801cf502b148d8ce1b5dfe7 /src/backend/access/gist
parent3adc760fb92eab1a8720337a8bf9b66486609eb3 (diff)
downloadpostgresql-fdf5a5efb7b28c13085fe7313658de8d7b9914f6.tar.gz
postgresql-fdf5a5efb7b28c13085fe7313658de8d7b9914f6.zip
pgindent run for 8.3.
Diffstat (limited to 'src/backend/access/gist')
-rw-r--r--src/backend/access/gist/gist.c6
-rw-r--r--src/backend/access/gist/gistget.c21
-rw-r--r--src/backend/access/gist/gistproc.c26
-rw-r--r--src/backend/access/gist/gistvacuum.c4
4 files changed, 30 insertions, 27 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 0c1b94d7d38..770c2023bd7 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gist/gist.c,v 1.147 2007/09/20 17:56:30 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gist.c,v 1.148 2007/11/15 21:14:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -360,8 +360,8 @@ gistplacetopage(GISTInsertState *state, GISTSTATE *giststate)
ptr->block.blkno = BufferGetBlockNumber(ptr->buffer);
/*
- * fill page, we can do it because all these pages are new
- * (ie not linked in tree or masked by temp page
+ * fill page, we can do it because all these pages are new (ie not
+ * linked in tree or masked by temp page
*/
data = (char *) (ptr->list);
for (i = 0; i < ptr->block.num; i++)
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index ba7a8ab959f..cb1919ac6e0 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gist/gistget.c,v 1.67 2007/09/12 22:10:25 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistget.c,v 1.68 2007/11/15 21:14:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -383,13 +383,12 @@ gistindex_keytest(IndexTuple tuple,
/*
* On non-leaf page we can't conclude that child hasn't NULL
* values because of assumption in GiST: uinon (VAL, NULL) is VAL
- * But if on non-leaf page key IS NULL then all childs
- * has NULL.
+ * But if on non-leaf page key IS NULL then all childs has NULL.
*/
- Assert( key->sk_flags & SK_SEARCHNULL );
+ Assert(key->sk_flags & SK_SEARCHNULL);
- if ( GistPageIsLeaf(p) && !isNull )
+ if (GistPageIsLeaf(p) && !isNull)
return false;
}
else if (isNull)
@@ -404,12 +403,14 @@ gistindex_keytest(IndexTuple tuple,
FALSE, isNull);
/*
- * Call the Consistent function to evaluate the test. The arguments
- * are the index datum (as a GISTENTRY*), the comparison datum, and
- * the comparison operator's strategy number and subtype from pg_amop.
+ * Call the Consistent function to evaluate the test. The
+ * arguments are the index datum (as a GISTENTRY*), the comparison
+ * datum, and the comparison operator's strategy number and
+ * subtype from pg_amop.
*
- * (Presently there's no need to pass the subtype since it'll always
- * be zero, but might as well pass it for possible future use.)
+ * (Presently there's no need to pass the subtype since it'll
+ * always be zero, but might as well pass it for possible future
+ * use.)
*/
test = FunctionCall4(&key->sk_func,
PointerGetDatum(&de),
diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c
index 590be9133fb..e461b5923d9 100644
--- a/src/backend/access/gist/gistproc.c
+++ b/src/backend/access/gist/gistproc.c
@@ -10,7 +10,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gist/gistproc.c,v 1.11 2007/09/07 17:04:26 teodor Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistproc.c,v 1.12 2007/11/15 21:14:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -394,20 +394,22 @@ gist_box_picksplit(PG_FUNCTION_ARGS)
ADDLIST(listT, unionT, posT, i);
}
-#define LIMIT_RATIO 0.1
+#define LIMIT_RATIO 0.1
#define _IS_BADRATIO(x,y) ( (y) == 0 || (float)(x)/(float)(y) < LIMIT_RATIO )
#define IS_BADRATIO(x,y) ( _IS_BADRATIO((x),(y)) || _IS_BADRATIO((y),(x)) )
/* bad disposition, try to split by centers of boxes */
- if ( IS_BADRATIO(posR, posL) && IS_BADRATIO(posT, posB) )
+ if (IS_BADRATIO(posR, posL) && IS_BADRATIO(posT, posB))
{
- double avgCenterX=0.0, avgCenterY=0.0;
- double CenterX, CenterY;
+ double avgCenterX = 0.0,
+ avgCenterY = 0.0;
+ double CenterX,
+ CenterY;
for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i))
{
cur = DatumGetBoxP(entryvec->vector[i].key);
- avgCenterX += ((double)cur->high.x + (double)cur->low.x)/2.0;
- avgCenterY += ((double)cur->high.y + (double)cur->low.y)/2.0;
+ avgCenterX += ((double) cur->high.x + (double) cur->low.x) / 2.0;
+ avgCenterY += ((double) cur->high.y + (double) cur->low.y) / 2.0;
}
avgCenterX /= maxoff;
@@ -417,11 +419,11 @@ gist_box_picksplit(PG_FUNCTION_ARGS)
for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i))
{
cur = DatumGetBoxP(entryvec->vector[i].key);
-
- CenterX = ((double)cur->high.x + (double)cur->low.x)/2.0;
- CenterY = ((double)cur->high.y + (double)cur->low.y)/2.0;
- if (CenterX < avgCenterX)
+ CenterX = ((double) cur->high.x + (double) cur->low.x) / 2.0;
+ CenterY = ((double) cur->high.y + (double) cur->low.y) / 2.0;
+
+ if (CenterX < avgCenterX)
ADDLIST(listL, unionL, posL, i);
else if (CenterX == avgCenterX)
{
@@ -442,7 +444,7 @@ gist_box_picksplit(PG_FUNCTION_ARGS)
else
ADDLIST(listB, unionB, posB, i);
}
- else
+ else
ADDLIST(listT, unionT, posT, i);
}
}
diff --git a/src/backend/access/gist/gistvacuum.c b/src/backend/access/gist/gistvacuum.c
index 212995e7c57..dace2c89067 100644
--- a/src/backend/access/gist/gistvacuum.c
+++ b/src/backend/access/gist/gistvacuum.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.32 2007/09/20 17:56:30 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.33 2007/11/15 21:14:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,7 +35,7 @@ typedef struct
Relation index;
MemoryContext opCtx;
GistBulkDeleteResult *result;
- BufferAccessStrategy strategy;
+ BufferAccessStrategy strategy;
} GistVacuum;
typedef struct