aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/gist')
-rw-r--r--src/backend/access/gist/gistget.c5
-rw-r--r--src/backend/access/gist/gistproc.c64
-rw-r--r--src/backend/access/gist/gistscan.c6
3 files changed, 38 insertions, 37 deletions
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index 5cf969a1fdf..216910307a8 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.84 2010/01/02 16:57:34 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistget.c,v 1.85 2010/02/26 02:00:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -414,7 +414,8 @@ gistindex_keytest(IndexTuple tuple,
/*
* On non-leaf page we can't conclude that child hasn't NULL
* values because of assumption in GiST: union (VAL, NULL) is VAL.
- * But if on non-leaf page key IS NULL, then all children are NULL.
+ * But if on non-leaf page key IS NULL, then all children are
+ * NULL.
*/
if (key->sk_flags & SK_SEARCHNULL)
{
diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c
index 18ee0259a59..cb34b26113e 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.20 2010/01/14 16:31:09 teodor Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistproc.c,v 1.21 2010/02/26 02:00:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -889,8 +889,8 @@ gist_point_compress(PG_FUNCTION_ARGS)
if (entry->leafkey) /* Point, actually */
{
- BOX *box = palloc(sizeof(BOX));
- Point *point = DatumGetPointP(entry->key);
+ BOX *box = palloc(sizeof(BOX));
+ Point *point = DatumGetPointP(entry->key);
GISTENTRY *retval = palloc(sizeof(GISTENTRY));
box->high = box->low = *point;
@@ -906,9 +906,9 @@ gist_point_compress(PG_FUNCTION_ARGS)
static bool
gist_point_consistent_internal(StrategyNumber strategy,
- bool isLeaf, BOX *key, Point *query)
+ bool isLeaf, BOX *key, Point *query)
{
- bool result = false;
+ bool result = false;
switch (strategy)
{
@@ -953,10 +953,10 @@ Datum
gist_point_consistent(PG_FUNCTION_ARGS)
{
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
- StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
+ StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
bool result;
bool *recheck = (bool *) PG_GETARG_POINTER(4);
- StrategyNumber strategyGroup = strategy / GeoStrategyNumberOffset;
+ StrategyNumber strategyGroup = strategy / GeoStrategyNumberOffset;
switch (strategyGroup)
{
@@ -969,22 +969,22 @@ gist_point_consistent(PG_FUNCTION_ARGS)
break;
case BoxStrategyNumberGroup:
result = DatumGetBool(DirectFunctionCall5(
- gist_box_consistent,
- PointerGetDatum(entry),
- PG_GETARG_DATUM(1),
- Int16GetDatum(RTOverlapStrategyNumber),
- 0, PointerGetDatum(recheck)));
+ gist_box_consistent,
+ PointerGetDatum(entry),
+ PG_GETARG_DATUM(1),
+ Int16GetDatum(RTOverlapStrategyNumber),
+ 0, PointerGetDatum(recheck)));
break;
case PolygonStrategyNumberGroup:
{
POLYGON *query = PG_GETARG_POLYGON_P(1);
result = DatumGetBool(DirectFunctionCall5(
- gist_poly_consistent,
- PointerGetDatum(entry),
- PolygonPGetDatum(query),
- Int16GetDatum(RTOverlapStrategyNumber),
- 0, PointerGetDatum(recheck)));
+ gist_poly_consistent,
+ PointerGetDatum(entry),
+ PolygonPGetDatum(query),
+ Int16GetDatum(RTOverlapStrategyNumber),
+ 0, PointerGetDatum(recheck)));
if (GIST_LEAF(entry) && result)
{
@@ -992,13 +992,13 @@ gist_point_consistent(PG_FUNCTION_ARGS)
* We are on leaf page and quick check shows overlapping
* of polygon's bounding box and point
*/
- BOX *box = DatumGetBoxP(entry->key);
+ BOX *box = DatumGetBoxP(entry->key);
Assert(box->high.x == box->low.x
- && box->high.y == box->low.y);
+ && box->high.y == box->low.y);
result = DatumGetBool(DirectFunctionCall2(
- poly_contain_pt,
- PolygonPGetDatum(query),
+ poly_contain_pt,
+ PolygonPGetDatum(query),
PointPGetDatum(&box->high)));
*recheck = false;
}
@@ -1006,14 +1006,14 @@ gist_point_consistent(PG_FUNCTION_ARGS)
break;
case CircleStrategyNumberGroup:
{
- CIRCLE *query = PG_GETARG_CIRCLE_P(1);
+ CIRCLE *query = PG_GETARG_CIRCLE_P(1);
result = DatumGetBool(DirectFunctionCall5(
- gist_circle_consistent,
- PointerGetDatum(entry),
- CirclePGetDatum(query),
- Int16GetDatum(RTOverlapStrategyNumber),
- 0, PointerGetDatum(recheck)));
+ gist_circle_consistent,
+ PointerGetDatum(entry),
+ CirclePGetDatum(query),
+ Int16GetDatum(RTOverlapStrategyNumber),
+ 0, PointerGetDatum(recheck)));
if (GIST_LEAF(entry) && result)
{
@@ -1021,20 +1021,20 @@ gist_point_consistent(PG_FUNCTION_ARGS)
* We are on leaf page and quick check shows overlapping
* of polygon's bounding box and point
*/
- BOX *box = DatumGetBoxP(entry->key);
+ BOX *box = DatumGetBoxP(entry->key);
Assert(box->high.x == box->low.x
- && box->high.y == box->low.y);
+ && box->high.y == box->low.y);
result = DatumGetBool(DirectFunctionCall2(
- circle_contain_pt,
- CirclePGetDatum(query),
+ circle_contain_pt,
+ CirclePGetDatum(query),
PointPGetDatum(&box->high)));
*recheck = false;
}
}
break;
default:
- result = false; /* silence compiler warning */
+ result = false; /* silence compiler warning */
elog(ERROR, "unknown strategy number: %d", strategy);
}
diff --git a/src/backend/access/gist/gistscan.c b/src/backend/access/gist/gistscan.c
index 1abdc3e168f..a53d8cd0873 100644
--- a/src/backend/access/gist/gistscan.c
+++ b/src/backend/access/gist/gistscan.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gist/gistscan.c,v 1.78 2010/01/02 16:57:34 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistscan.c,v 1.79 2010/02/26 02:00:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -92,8 +92,8 @@ gistrescan(PG_FUNCTION_ARGS)
* field.
*
* Next, if any of keys is a NULL and that key is not marked with
- * SK_SEARCHNULL/SK_SEARCHNOTNULL then nothing can be found (ie,
- * we assume all indexable operators are strict).
+ * SK_SEARCHNULL/SK_SEARCHNOTNULL then nothing can be found (ie, we
+ * assume all indexable operators are strict).
*/
for (i = 0; i < scan->numberOfKeys; i++)
{