summaryrefslogtreecommitdiff
path: root/src/backend/access/hash/hashstrat.c
blob: a765c2e2b19034a6c008f0b94566933e1a73fba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*-------------------------------------------------------------------------
 *
 * hashstrat.c
 *	  Srategy map entries for the hash indexed 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/hash/Attic/hashstrat.c,v 1.19 2001/10/25 05:49:21 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