mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Add operator strategy and comparison-value datatype fields to ScanKey.
Remove the 'strategy map' code, which was a large amount of mechanism that no longer had any use except reverse-mapping from procedure OID to strategy number. Passing the strategy number to the index AM in the first place is simpler and faster. This is a preliminary step in planned support for cross-datatype index operations. I'm committing it now since the ScanKeyEntryInitialize() API change touches quite a lot of files, and I want to commit those changes before the tree drifts under me.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# Makefile for access/hash
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/access/hash/Makefile,v 1.10 2000/08/31 16:09:33 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/access/hash/Makefile,v 1.11 2003/11/09 21:30:35 tgl Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -13,7 +13,7 @@ top_builddir = ../../../..
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
OBJS = hash.o hashfunc.o hashinsert.o hashovfl.o hashpage.o hashscan.o \
|
||||
hashsearch.o hashstrat.o hashutil.o
|
||||
hashsearch.o hashutil.o
|
||||
|
||||
all: SUBSYS.o
|
||||
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* hashstrat.c
|
||||
* Strategy map entries for the hash indexed access method
|
||||
*
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/Attic/hashstrat.c,v 1.23 2003/08/04 02:39:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/hash.h"
|
||||
|
||||
|
||||
/*
|
||||
* only one valid strategy for hash tables: equality.
|
||||
*/
|
||||
|
||||
#ifdef NOT_USED
|
||||
|
||||
static StrategyNumber HTNegate[HTMaxStrategyNumber] = {
|
||||
InvalidStrategy
|
||||
};
|
||||
|
||||
static StrategyNumber HTCommute[HTMaxStrategyNumber] = {
|
||||
HTEqualStrategyNumber
|
||||
};
|
||||
|
||||
static StrategyNumber HTNegateCommute[HTMaxStrategyNumber] = {
|
||||
InvalidStrategy
|
||||
};
|
||||
|
||||
static StrategyExpression HTEvaluationExpressions[HTMaxStrategyNumber] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static StrategyEvaluationData HTEvaluationData = {
|
||||
HTMaxStrategyNumber,
|
||||
(StrategyTransformMap) HTNegate,
|
||||
(StrategyTransformMap) HTCommute,
|
||||
(StrategyTransformMap) HTNegateCommute,
|
||||
HTEvaluationExpressions
|
||||
};
|
||||
#endif
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* RelationGetHashStrategy
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef NOT_USED
|
||||
static StrategyNumber
|
||||
_hash_getstrat(Relation rel,
|
||||
AttrNumber attno,
|
||||
RegProcedure proc)
|
||||
{
|
||||
StrategyNumber strat;
|
||||
|
||||
strat = RelationGetStrategy(rel, attno, &HTEvaluationData, proc);
|
||||
|
||||
Assert(StrategyNumberIsValid(strat));
|
||||
|
||||
return strat;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NOT_USED
|
||||
static bool
|
||||
_hash_invokestrat(Relation rel,
|
||||
AttrNumber attno,
|
||||
StrategyNumber strat,
|
||||
Datum left,
|
||||
Datum right)
|
||||
{
|
||||
return (RelationInvokeStrategy(rel, &HTEvaluationData, attno, strat,
|
||||
left, right));
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user