nodeHash.h 1.55 KB
Newer Older
1 2
/*-------------------------------------------------------------------------
 *
3
 * nodeHash.h
4
 *	  prototypes for nodeHash.c
5 6
 *
 *
7
 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
8
 * Portions Copyright (c) 1994, Regents of the University of California
9
 *
10
 * $PostgreSQL: pgsql/src/include/executor/nodeHash.h,v 1.36 2005/03/06 22:15:05 tgl Exp $
11 12 13
 *
 *-------------------------------------------------------------------------
 */
14 15
#ifndef NODEHASH_H
#define NODEHASH_H
16

17
#include "nodes/execnodes.h"
18

19
extern int	ExecCountSlotsHash(Hash *node);
20 21 22 23 24
extern HashState *ExecInitHash(Hash *node, EState *estate);
extern TupleTableSlot *ExecHash(HashState *node);
extern void ExecEndHash(HashState *node);
extern void ExecReScanHash(HashState *node, ExprContext *exprCtxt);

25
extern HashJoinTable ExecHashTableCreate(Hash *node, List *hashOperators);
26
extern void ExecHashTableDestroy(HashJoinTable hashtable);
27
extern void ExecHashTableInsert(HashJoinTable hashtable,
28 29 30 31 32 33 34 35 36 37 38 39
								HeapTuple tuple,
								uint32 hashvalue);
extern uint32 ExecHashGetHashValue(HashJoinTable hashtable,
								   ExprContext *econtext,
								   List *hashkeys);
extern void ExecHashGetBucketAndBatch(HashJoinTable hashtable,
									  uint32 hashvalue,
									  int *bucketno,
									  int *batchno);
extern HeapTuple ExecScanHashBucket(HashJoinState *hjstate,
									ExprContext *econtext);
extern void ExecHashTableReset(HashJoinTable hashtable);
40
extern void ExecChooseHashTableSize(double ntuples, int tupwidth,
41
						int *numbuckets,
42
						int *numbatches);
43

44
#endif   /* NODEHASH_H */