diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-05-30 19:53:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-05-30 19:53:40 +0000 |
commit | f1d5d0905c16021cd715ea078c806bf7e0673a83 (patch) | |
tree | 6b038b087cf15e8bf144450bb90a941c54f53eb9 /src/backend/access/gist | |
parent | f504ad1b4d6ebf991bb824765aa1f91eedf52a16 (diff) | |
download | postgresql-f1d5d0905c16021cd715ea078c806bf7e0673a83.tar.gz postgresql-f1d5d0905c16021cd715ea078c806bf7e0673a83.zip |
Tweak StrategyEvaluation data structure to eliminate hardwired limit on
number of strategies supported by an index AM. Add missing copyright
notices and CVS $Header$ markers to GIST source files.
Diffstat (limited to 'src/backend/access/gist')
-rw-r--r-- | src/backend/access/gist/gist.c | 9 | ||||
-rw-r--r-- | src/backend/access/gist/gistget.c | 6 | ||||
-rw-r--r-- | src/backend/access/gist/gistscan.c | 8 | ||||
-rw-r--r-- | src/backend/access/gist/giststrat.c | 15 |
4 files changed, 24 insertions, 14 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index 4b239c76c8b..8f23d14d79d 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -4,13 +4,14 @@ * interface routines for the postgres GiST index access method. * * + * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.76 2001/05/15 14:14:49 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.77 2001/05/30 19:53:39 tgl Exp $ * *------------------------------------------------------------------------- */ - #include "postgres.h" #include "access/genam.h" @@ -22,9 +23,9 @@ #include "executor/executor.h" #include "miscadmin.h" #include "utils/syscache.h" - #include "access/xlogutils.h" + /* result's status */ #define INSERTED 0x01 #define SPLITED 0x02 @@ -78,9 +79,9 @@ static void gistcentryinit(GISTSTATE *giststate, OffsetNumber o, int b, bool l); #undef GISTDEBUG + #ifdef GISTDEBUG static void gist_dumptree(Relation r, int level, BlockNumber blk, OffsetNumber coff); - #endif /* diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c index d6fac6f4e20..f922da750dd 100644 --- a/src/backend/access/gist/gistget.c +++ b/src/backend/access/gist/gistget.c @@ -4,20 +4,20 @@ * fetch tuples from a GiST scan. * * + * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * /usr/local/devel/pglite/cvs/src/backend/access/gisr/gistget.c,v 1.9.1 1996/11/21 01:00:00 vadim Exp + * $Header: /cvsroot/pgsql/src/backend/access/gist/gistget.c,v 1.27 2001/05/30 19:53:40 tgl Exp $ * *------------------------------------------------------------------------- */ - #include "postgres.h" #include "access/gist.h" #include "executor/execdebug.h" - static OffsetNumber gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir); static RetrieveIndexResult gistscancache(IndexScanDesc s, ScanDirection dir); diff --git a/src/backend/access/gist/gistscan.c b/src/backend/access/gist/gistscan.c index ea6114033e8..bcabd6caf2e 100644 --- a/src/backend/access/gist/gistscan.c +++ b/src/backend/access/gist/gistscan.c @@ -1,15 +1,17 @@ /*------------------------------------------------------------------------- * * gistscan.c - * routines to manage scans on index relations + * routines to manage scans on GiST index relations * * + * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * * IDENTIFICATION - * /usr/local/devel/pglite/cvs/src/backend/access/gist/gistscan.c,v 1.7 1995/06/14 00:10:05 jolly Exp + * $Header: /cvsroot/pgsql/src/backend/access/gist/gistscan.c,v 1.34 2001/05/30 19:53:40 tgl Exp $ * *------------------------------------------------------------------------- */ - #include "postgres.h" #include "access/genam.h" diff --git a/src/backend/access/gist/giststrat.c b/src/backend/access/gist/giststrat.c index 31ef31dedf7..e0bae48a3c4 100644 --- a/src/backend/access/gist/giststrat.c +++ b/src/backend/access/gist/giststrat.c @@ -3,21 +3,21 @@ * giststrat.c * strategy map data for GiSTs. * + * * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * * IDENTIFICATION - * /usr/local/devel/pglite/cvs/src/backend/access/gist/giststrat.c,v 1.4 1995/06/14 00:10:05 jolly Exp + * $Header: /cvsroot/pgsql/src/backend/access/gist/Attic/giststrat.c,v 1.17 2001/05/30 19:53:40 tgl Exp $ * *------------------------------------------------------------------------- */ - #include "postgres.h" #include "access/gist.h" #include "access/istrat.h" + /* * Note: negate, commute, and negatecommute all assume that operators are * ordered as follows in the strategy map: @@ -71,6 +71,12 @@ static StrategyNumber GISTNegateCommute[GISTNStrategies] = { * TermData) -- such logic must be encoded in the user's Consistent function. */ +static StrategyExpression GISTEvaluationExpressions[GISTNStrategies] = { + NULL, + NULL, + NULL +}; + /* * If you were sufficiently attentive to detail, you would go through * the ExpressionData pain above for every one of the strategies @@ -92,9 +98,10 @@ static StrategyEvaluationData GISTEvaluationData = { (StrategyTransformMap) GISTNegate, /* how to do (not qual) */ (StrategyTransformMap) GISTCommute, /* how to swap operands */ (StrategyTransformMap) GISTNegateCommute, /* how to do both */ - {NULL} + GISTEvaluationExpressions }; + StrategyNumber RelationGetGISTStrategy(Relation r, AttrNumber attnum, |