aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/gist_private.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-02-10 11:58:23 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2013-02-10 11:58:23 -0500
commit2f0491dd1a34ea9390910afe532b6c2ca8db3c11 (patch)
treec2c4f99f56a8e9c3562940636f061c77f5382402 /src/include/access/gist_private.h
parent3ea1ab283a493815a9f93f6380731b7e0a568be7 (diff)
downloadpostgresql-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/include/access/gist_private.h')
-rw-r--r--src/include/access/gist_private.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h
index d0d5262fe0c..d9b1fa2fec5 100644
--- a/src/include/access/gist_private.h
+++ b/src/include/access/gist_private.h
@@ -254,20 +254,21 @@ typedef struct GISTInsertStack
struct GISTInsertStack *parent;
} GISTInsertStack;
+/* Working state and results for multi-column split logic in gistsplit.c */
typedef struct GistSplitVector
{
- GIST_SPLITVEC splitVector; /* to/from PickSplit method */
+ GIST_SPLITVEC splitVector; /* passed to/from user PickSplit method */
Datum spl_lattr[INDEX_MAX_KEYS]; /* Union of subkeys in
- * spl_left */
+ * splitVector.spl_left */
bool spl_lisnull[INDEX_MAX_KEYS];
Datum spl_rattr[INDEX_MAX_KEYS]; /* Union of subkeys in
- * spl_right */
+ * splitVector.spl_right */
bool spl_risnull[INDEX_MAX_KEYS];
- bool *spl_equiv; /* equivalent tuples which can be freely
- * distributed between left and right pages */
+ bool *spl_dontcare; /* flags tuples which could go to either side
+ * of the split for zero penalty */
} GistSplitVector;
typedef struct
@@ -526,7 +527,7 @@ extern Datum gistvacuumcleanup(PG_FUNCTION_ARGS);
/* gistsplit.c */
extern void gistSplitByKey(Relation r, Page page, IndexTuple *itup,
int len, GISTSTATE *giststate,
- GistSplitVector *v, GistEntryVector *entryvec,
+ GistSplitVector *v,
int attno);
/* gistbuild.c */