From 0fd0f3688b7a8ab0b907d431cf7022098110cfc8 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 10 Feb 2013 11:58:15 -0500 Subject: 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. --- src/backend/access/gist/gist.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/backend/access/gist/gist.c') diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index 4686242802..e2d3390300 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -1237,18 +1237,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)); -- cgit v1.2.1