diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-02-10 11:58:23 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-02-10 11:58:23 -0500 |
commit | 2f0491dd1a34ea9390910afe532b6c2ca8db3c11 (patch) | |
tree | c2c4f99f56a8e9c3562940636f061c77f5382402 /src/backend/access/gist/gist.c | |
parent | 3ea1ab283a493815a9f93f6380731b7e0a568be7 (diff) | |
download | postgresql-2f0491dd1a34ea9390910afe532b6c2ca8db3c11.tar.gz postgresql-2f0491dd1a34ea9390910afe532b6c2ca8db3c11.zip |
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.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index 3f5c16c1c84..7ccf5d5966f 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -1238,18 +1238,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)); |