summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-02-10 11:58:38 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2013-02-10 11:58:38 -0500
commitadc3fdd0d0e19d384fe71d7bd4b1df94d0fa30e7 (patch)
tree941eb72613b9a1c6699ba6bb00a0ef503e1ecfcc /src/backend/access/gist/gist.c
parent369c70ea44c6c3e22865711228b5080545f46d25 (diff)
Document and clean up gistsplit.c.
Improve comments, rename some variables and functions, slightly simplify a couple of APIs, in an attempt to make this code readable by people other than its original author. Even though this is essentially just cosmetic, back-patch to all active branches, because otherwise it's going to make back-patching future fixes in this file very painful.
Diffstat (limited to 'src/backend/access/gist/gist.c')
-rw-r--r--src/backend/access/gist/gist.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index e9aa66e27a0..5eadb2a2862 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -945,18 +945,12 @@ gistSplit(Relation r,
IndexTuple *lvectup,
*rvectup;
GistSplitVector v;
- GistEntryVector *entryvec;
int i;
SplitedPageLayout *res = NULL;
- /* generate the item array */
- entryvec = palloc(GEVHDRSZ + (len + 1) * sizeof(GISTENTRY));
- entryvec->n = len + 1;
-
memset(v.spl_lisnull, TRUE, sizeof(bool) * giststate->tupdesc->natts);
memset(v.spl_risnull, TRUE, sizeof(bool) * giststate->tupdesc->natts);
- gistSplitByKey(r, page, itup, len, giststate,
- &v, entryvec, 0);
+ gistSplitByKey(r, page, itup, len, giststate, &v, 0);
/* form left and right vector */
lvectup = (IndexTuple *) palloc(sizeof(IndexTuple) * (len + 1));