diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-05-09 00:53:22 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-05-09 00:53:22 +0000 |
commit | 71d5d95376fb9b675a191c128e6c5e5ff3940f78 (patch) | |
tree | 83eca2cf00d220c0499ab2da273374877b58d02d /src/backend/executor/nodeHashjoin.c | |
parent | c1167a08cacb86c0e6c22e3db81233143ceba5b8 (diff) | |
download | postgresql-71d5d95376fb9b675a191c128e6c5e5ff3940f78.tar.gz postgresql-71d5d95376fb9b675a191c128e6c5e5ff3940f78.zip |
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/backend/executor/nodeHashjoin.c')
-rw-r--r-- | src/backend/executor/nodeHashjoin.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index b4ffdd5c73a..10e4cfb44fc 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.18 1999/05/06 00:30:47 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.19 1999/05/09 00:53:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -74,7 +74,6 @@ ExecHashJoin(HashJoin *node) int nbatch; int curbatch; File *outerbatches; - RelativeAddr *outerbatchNames; RelativeAddr *outerbatchPos; Var *innerhashkey; int batch; @@ -166,21 +165,10 @@ ExecHashJoin(HashJoin *node) */ innerhashkey = hashNode->hashkey; hjstate->hj_InnerHashKey = innerhashkey; - outerbatchNames = (RelativeAddr *) - ABSADDR(hashtable->outerbatchNames); - outerbatches = (File *) - palloc(nbatch * sizeof(File)); + outerbatches = (File *) palloc(nbatch * sizeof(File)); for (i = 0; i < nbatch; i++) { -#ifndef __CYGWIN32__ - outerbatches[i] = FileNameOpenFile( - ABSADDR(outerbatchNames[i]), - O_CREAT | O_RDWR, 0600); -#else - outerbatches[i] = FileNameOpenFile( - ABSADDR(outerbatchNames[i]), - O_CREAT | O_RDWR | O_BINARY, 0600); -#endif + outerbatches[i] = OpenTemporaryFile(); } hjstate->hj_OuterBatches = outerbatches; @@ -193,7 +181,6 @@ ExecHashJoin(HashJoin *node) } outerbatchPos = (RelativeAddr *) ABSADDR(hashtable->outerbatchPos); curbatch = hashtable->curbatch; - outerbatchNames = (RelativeAddr *) ABSADDR(hashtable->outerbatchNames); /* ---------------- * Now get an outer tuple and probe into the hash table for matches |