aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/rtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/rtree')
-rw-r--r--src/backend/access/rtree/rtget.c26
-rw-r--r--src/backend/access/rtree/rtproc.c12
-rw-r--r--src/backend/access/rtree/rtree.c24
-rw-r--r--src/backend/access/rtree/rtscan.c4
-rw-r--r--src/backend/access/rtree/rtstrat.c6
5 files changed, 36 insertions, 36 deletions
diff --git a/src/backend/access/rtree/rtget.c b/src/backend/access/rtree/rtget.c
index eb9d43943ed..644240e6504 100644
--- a/src/backend/access/rtree/rtget.c
+++ b/src/backend/access/rtree/rtget.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.10 1998/06/15 19:28:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.11 1998/09/01 03:21:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,14 +43,14 @@ rtgettuple(IndexScanDesc s, ScanDirection dir)
/* if we have it cached in the scan desc, just return the value */
if ((res = rtscancache(s, dir)) != (RetrieveIndexResult) NULL)
- return (res);
+ return res;
/* not cached, so we'll have to do some work */
if (ItemPointerIsValid(&(s->currentItemData)))
res = rtnext(s, dir);
else
res = rtfirst(s, dir);
- return (res);
+ return res;
}
static RetrieveIndexResult
@@ -85,7 +85,7 @@ rtfirst(IndexScanDesc s, ScanDirection dir)
ReleaseBuffer(b);
if (so->s_stack == (RTSTACK *) NULL)
- return ((RetrieveIndexResult) NULL);
+ return (RetrieveIndexResult) NULL;
stk = so->s_stack;
b = ReadBuffer(s->relation, stk->rts_blk);
@@ -111,7 +111,7 @@ rtfirst(IndexScanDesc s, ScanDirection dir)
res = FormRetrieveIndexResult(&(s->currentItemData), &(it->t_tid));
ReleaseBuffer(b);
- return (res);
+ return res;
}
else
{
@@ -169,7 +169,7 @@ rtnext(IndexScanDesc s, ScanDirection dir)
ReleaseBuffer(b);
if (so->s_stack == (RTSTACK *) NULL)
- return ((RetrieveIndexResult) NULL);
+ return (RetrieveIndexResult) NULL;
stk = so->s_stack;
b = ReadBuffer(s->relation, stk->rts_blk);
@@ -195,7 +195,7 @@ rtnext(IndexScanDesc s, ScanDirection dir)
res = FormRetrieveIndexResult(&(s->currentItemData), &(it->t_tid));
ReleaseBuffer(b);
- return (res);
+ return res;
}
else
{
@@ -250,14 +250,14 @@ findnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
if (po->flags & F_LEAF)
{
if (index_keytest(it,
- RelationGetTupleDescriptor(s->relation),
+ RelationGetDescr(s->relation),
s->numberOfKeys, s->keyData))
break;
}
else
{
if (index_keytest(it,
- RelationGetTupleDescriptor(s->relation),
+ RelationGetDescr(s->relation),
so->s_internalNKey, so->s_internalKey))
break;
}
@@ -268,7 +268,7 @@ findnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
n = OffsetNumberNext(n);
}
- return (n);
+ return n;
}
static RetrieveIndexResult
@@ -281,7 +281,7 @@ rtscancache(IndexScanDesc s, ScanDirection dir)
&& ItemPointerIsValid(&(s->currentItemData))))
{
- return ((RetrieveIndexResult) NULL);
+ return (RetrieveIndexResult) NULL;
}
ip = rtheapptr(s->relation, &(s->currentItemData));
@@ -293,7 +293,7 @@ rtscancache(IndexScanDesc s, ScanDirection dir)
pfree(ip);
- return (res);
+ return res;
}
/*
@@ -323,5 +323,5 @@ rtheapptr(Relation r, ItemPointer itemp)
else
ItemPointerSetInvalid(ip);
- return (ip);
+ return ip;
}
diff --git a/src/backend/access/rtree/rtproc.c b/src/backend/access/rtree/rtproc.c
index e9b52ead239..a2bced8fc77 100644
--- a/src/backend/access/rtree/rtproc.c
+++ b/src/backend/access/rtree/rtproc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.16 1998/02/26 04:30:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.17 1998/09/01 03:21:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,7 +36,7 @@ rt_box_union(BOX *a, BOX *b)
n->low.x = Min(a->low.x, b->low.x);
n->low.y = Min(a->low.y, b->low.y);
- return (n);
+ return n;
}
BOX *
@@ -55,10 +55,10 @@ rt_box_inter(BOX *a, BOX *b)
if (n->high.x < n->low.x || n->high.y < n->low.y)
{
pfree(n);
- return ((BOX *) NULL);
+ return (BOX *) NULL;
}
- return (n);
+ return n;
}
void
@@ -149,8 +149,8 @@ rt_poly_inter(POLYGON *a, POLYGON *b)
if (p->boundbox.high.x < p->boundbox.low.x || p->boundbox.high.y < p->boundbox.low.y)
{
pfree(p);
- return ((POLYGON *) NULL);
+ return (POLYGON *) NULL;
}
- return (p);
+ return p;
}
diff --git a/src/backend/access/rtree/rtree.c b/src/backend/access/rtree/rtree.c
index c86fec6c3a8..2352b9b7e71 100644
--- a/src/backend/access/rtree/rtree.c
+++ b/src/backend/access/rtree/rtree.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.26 1998/08/19 02:01:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.27 1998/09/01 03:21:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -136,8 +136,8 @@ rtbuild(Relation heap,
}
/* init the tuple descriptors and get set for a heap scan */
- hd = RelationGetTupleDescriptor(heap);
- id = RelationGetTupleDescriptor(index);
+ hd = RelationGetDescr(heap);
+ id = RelationGetDescr(index);
d = (Datum *) palloc(natts * sizeof(*d));
nulls = (bool *) palloc(natts * sizeof(*nulls));
@@ -310,7 +310,7 @@ rtinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation he
RTSTATE rtState;
/* generate an index tuple */
- itup = index_formtuple(RelationGetTupleDescriptor(r), datum, nulls);
+ itup = index_formtuple(RelationGetDescr(r), datum, nulls);
itup->t_tid = *ht_ctid;
initRtstate(&rtState, r);
@@ -318,7 +318,7 @@ rtinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation he
res = rtdoinsert(r, itup, &rtState);
/* XXX two-phase locking -- don't unlock the relation until EOT */
- return (res);
+ return res;
}
static InsertIndexResult
@@ -372,7 +372,7 @@ rtdoinsert(Relation r, IndexTuple itup, RTSTATE *rtstate)
res = dosplit(r, buffer, stack, itup, rtstate);
freestack(stack);
WriteBuffer(buffer); /* don't forget to release buffer! */
- return (res);
+ return res;
}
/* add the item and write the buffer */
@@ -402,7 +402,7 @@ rtdoinsert(Relation r, IndexTuple itup, RTSTATE *rtstate)
res = (InsertIndexResult) palloc(sizeof(InsertIndexResultData));
ItemPointerSet(&(res->pointerData), blk, l);
- return (res);
+ return res;
}
static void
@@ -435,7 +435,7 @@ rttighten(Relation r,
if (newd_size != old_size)
{
- TupleDesc td = RelationGetTupleDescriptor(r);
+ TupleDesc td = RelationGetDescr(r);
if (td->attrs[0]->attlen < 0)
{
@@ -620,7 +620,7 @@ dosplit(Relation r,
pfree(ltup);
pfree(rtup);
- return (res);
+ return res;
}
static void
@@ -922,13 +922,13 @@ choose(Relation r, Page p, IndexTuple it, RTSTATE *rtstate)
}
}
- return (which);
+ return which;
}
static int
nospace(Page p, IndexTuple it)
{
- return (PageGetFreeSpace(p) < IndexTupleSize(it));
+ return PageGetFreeSpace(p) < IndexTupleSize(it);
}
void
@@ -970,7 +970,7 @@ rtdelete(Relation r, ItemPointer tid)
WriteBuffer(buf);
/* XXX -- two-phase locking, don't release the write lock */
- return ((char *) NULL);
+ return (char *) NULL;
}
static void
diff --git a/src/backend/access/rtree/rtscan.c b/src/backend/access/rtree/rtscan.c
index 2c14968d4ef..21e1f1c3119 100644
--- a/src/backend/access/rtree/rtscan.c
+++ b/src/backend/access/rtree/rtscan.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.17 1998/08/19 02:01:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.18 1998/09/01 03:21:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -73,7 +73,7 @@ rtbeginscan(Relation r,
s = RelationGetIndexScan(r, fromEnd, nkeys, key);
rtregscan(s);
- return (s);
+ return s;
}
void
diff --git a/src/backend/access/rtree/rtstrat.c b/src/backend/access/rtree/rtstrat.c
index 028625d48a1..04c5728888e 100644
--- a/src/backend/access/rtree/rtstrat.c
+++ b/src/backend/access/rtree/rtstrat.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtstrat.c,v 1.8 1997/09/08 02:21:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtstrat.c,v 1.9 1998/09/01 03:21:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -209,7 +209,7 @@ RelationGetRTStrategy(Relation r,
AttrNumber attnum,
RegProcedure proc)
{
- return (RelationGetStrategy(r, attnum, &RTEvaluationData, proc));
+ return RelationGetStrategy(r, attnum, &RTEvaluationData, proc);
}
#ifdef NOT_USED
@@ -239,5 +239,5 @@ RTMapOperator(Relation r,
RTNStrategies,
attnum);
- return (strategyMap->entry[RTOperMap[procstrat - 1] - 1].sk_procedure);
+ return strategyMap->entry[RTOperMap[procstrat - 1] - 1].sk_procedure;
}