OSDN Git Service

4f4359c23e3f49ba2e49f596c15e88896baab817
[pg-rex/syncrep.git] / src / include / executor / nodeHash.h
1 /*-------------------------------------------------------------------------
2  *
3  * nodeHash.h
4  *        prototypes for nodeHash.c
5  *
6  *
7  * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: nodeHash.h,v 1.31 2003/08/04 00:43:30 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef NODEHASH_H
15 #define NODEHASH_H
16
17 #include "nodes/execnodes.h"
18
19 extern int      ExecCountSlotsHash(Hash *node);
20 extern HashState *ExecInitHash(Hash *node, EState *estate);
21 extern TupleTableSlot *ExecHash(HashState *node);
22 extern void ExecEndHash(HashState *node);
23 extern void ExecReScanHash(HashState *node, ExprContext *exprCtxt);
24
25 extern HashJoinTable ExecHashTableCreate(Hash *node, List *hashOperators);
26 extern void ExecHashTableDestroy(HashJoinTable hashtable);
27 extern void ExecHashTableInsert(HashJoinTable hashtable,
28                                         ExprContext *econtext,
29                                         List *hashkeys);
30 extern int ExecHashGetBucket(HashJoinTable hashtable,
31                                   ExprContext *econtext,
32                                   List *hashkeys);
33 extern int      ExecHashGetBatch(int bucketno, HashJoinTable hashtable);
34 extern HeapTuple ExecScanHashBucket(HashJoinState *hjstate, List *hjclauses,
35                                    ExprContext *econtext);
36 extern void ExecHashTableReset(HashJoinTable hashtable, long ntuples);
37 extern void ExecChooseHashTableSize(double ntuples, int tupwidth,
38                                                 int *virtualbuckets,
39                                                 int *physicalbuckets,
40                                                 int *numbatches);
41
42 #endif   /* NODEHASH_H */