summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane1999-05-09 00:53:22 +0000
committerTom Lane1999-05-09 00:53:22 +0000
commit71d5d95376fb9b675a191c128e6c5e5ff3940f78 (patch)
tree83eca2cf00d220c0499ab2da273374877b58d02d /src/include
parentc1167a08cacb86c0e6c22e3db81233143ceba5b8 (diff)
Update hash and join routines to use fd.c's new temp-file
code, instead of not-very-bulletproof stuff they had before.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/executor/hashjoin.h4
-rw-r--r--src/include/utils/psort.h13
2 files changed, 6 insertions, 11 deletions
diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h
index ec6c234f28b..62e2164df31 100644
--- a/src/include/executor/hashjoin.h
+++ b/src/include/executor/hashjoin.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: hashjoin.h,v 1.9 1999/05/06 00:30:45 tgl Exp $
+ * $Id: hashjoin.h,v 1.10 1999/05/09 00:53:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,9 +54,7 @@ typedef struct HashTableData
RelativeAddr batch; /* char* */
RelativeAddr readbuf; /* char* */
int nbatch;
- RelativeAddr outerbatchNames; /* RelativeAddr* */
RelativeAddr outerbatchPos; /* RelativeAddr* */
- RelativeAddr innerbatchNames; /* RelativeAddr* */
RelativeAddr innerbatchPos; /* RelativeAddr* */
RelativeAddr innerbatchSizes; /* int* */
int curbatch;
diff --git a/src/include/utils/psort.h b/src/include/utils/psort.h
index 73d49d82528..32661031a5c 100644
--- a/src/include/utils/psort.h
+++ b/src/include/utils/psort.h
@@ -6,27 +6,25 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: psort.h,v 1.17 1999/02/13 23:22:29 momjian Exp $
+ * $Id: psort.h,v 1.18 1999/05/09 00:53:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PSORT_H
#define PSORT_H
-#include <stdio.h>
+#include "storage/fd.h"
#include "access/relscan.h"
#include "utils/lselect.h"
#include "nodes/plannodes.h"
-#define MAXTAPES 7 /* 7--See Fig. 70, p273 */
-#define TAPEEXTLEN strlen("pg_psort.xxxxx.xxx") /* TEMPDIR/TAPEEXT */
-#define FREE(x) pfree((char *) x)
+#define MAXTAPES 7 /* See Knuth Fig. 70, p273 */
struct tape
{
int tp_dummy; /* (D) */
int tp_fib; /* (A) */
- FILE *tp_file; /* (TAPE) */
+ BufFile *tp_file; /* (TAPE) */
struct tape *tp_prev;
};
@@ -58,7 +56,7 @@ typedef struct Psortstate
struct leftist *Tuples;
- FILE *psort_grab_file;
+ BufFile *psort_grab_file;
long psort_current; /* could be file offset, or array index */
long psort_saved; /* could be file offset, or array index */
bool using_tape_files;
@@ -68,7 +66,6 @@ typedef struct Psortstate
} Psortstate;
#ifdef EBUG
-#include <stdio.h>
#include "utils/elog.h"
#include "storage/buf.h"
#include "storage/bufmgr.h"