aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistget.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-01-14 22:03:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-01-14 22:03:35 +0000
commitf7ea9312877abcb508669359fa2a05fc69ec91b9 (patch)
tree5091d2d5bf06da0955d86c20038f9fa7eaf48346 /src/backend/access/gist/gistget.c
parent7930e627d8aaf617f4edb8b9e4fe410cc475a93a (diff)
downloadpostgresql-f7ea9312877abcb508669359fa2a05fc69ec91b9.tar.gz
postgresql-f7ea9312877abcb508669359fa2a05fc69ec91b9.zip
Some minor code cleanup, falling out from the removal of rtree. SK_NEGATE
isn't being used anywhere anymore, and there seems no point in a generic index_keytest() routine when two out of three remaining access methods aren't using it. Also, add a comment documenting a convention for letting access methods define private flag bits in ScanKey sk_flags. There are no such flags at the moment but I'm thinking about changing btree's handling of "required keys" to use flag bits in the keys rather than a count of required key positions. Also, if some AM did still want SK_NEGATE then it would be reasonable to treat it as a private flag bit.
Diffstat (limited to 'src/backend/access/gist/gistget.c')
-rw-r--r--src/backend/access/gist/gistget.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index 5e4cf7fcc22..7b8b462df10 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gist/gistget.c,v 1.54 2005/11/22 18:17:05 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistget.c,v 1.55 2006/01/14 22:03:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -332,13 +332,15 @@ gistnext(IndexScanDesc scan, ScanDirection dir, ItemPointer tids, int maxtids, b
}
/*
- * Similar to index_keytest, but first decompress the key in the
- * IndexTuple before passing it to the sk_func (and we have previously
- * overwritten the sk_func to use the user-defined Consistent method,
- * so we actually invoke that). Note that this function is always
- * invoked in a short-lived memory context, so we don't need to worry
- * about cleaning up allocated memory (either here or in the
- * implementation of any Consistent methods).
+ * gistindex_keytest() -- does this index tuple satisfy the scan key(s)?
+ *
+ * We must decompress the key in the IndexTuple before passing it to the
+ * sk_func (and we have previously overwritten the sk_func to use the
+ * user-defined Consistent method, so we actually are invoking that).
+ *
+ * Note that this function is always invoked in a short-lived memory context,
+ * so we don't need to worry about cleaning up allocated memory, either here
+ * or in the implementation of any Consistent methods.
*/
static bool
gistindex_keytest(IndexTuple tuple,