mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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.
This commit is contained in:
@ -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
|
||||
|
||||
/*
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user