Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
318e593f
Commit
318e593f
authored
Feb 09, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Temp to Noname for noname tables.
parent
78511d8f
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
198 additions
and
198 deletions
+198
-198
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+4
-4
src/backend/commands/explain.c
src/backend/commands/explain.c
+3
-3
src/backend/executor/execAmi.c
src/backend/executor/execAmi.c
+4
-4
src/backend/executor/nodeMaterial.c
src/backend/executor/nodeMaterial.c
+4
-4
src/backend/executor/nodeSort.c
src/backend/executor/nodeSort.c
+2
-2
src/backend/nodes/copyfuncs.c
src/backend/nodes/copyfuncs.c
+16
-16
src/backend/nodes/freefuncs.c
src/backend/nodes/freefuncs.c
+13
-13
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+15
-15
src/backend/nodes/print.c
src/backend/nodes/print.c
+3
-3
src/backend/nodes/readfuncs.c
src/backend/nodes/readfuncs.c
+21
-21
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/costsize.c
+3
-3
src/backend/optimizer/path/joinutils.c
src/backend/optimizer/path/joinutils.c
+5
-5
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/createplan.c
+41
-41
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planmain.c
+2
-2
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/planner.c
+2
-2
src/backend/optimizer/plan/setrefs.c
src/backend/optimizer/plan/setrefs.c
+35
-35
src/backend/optimizer/util/relnode.c
src/backend/optimizer/util/relnode.c
+3
-3
src/include/nodes/nodes.h
src/include/nodes/nodes.h
+4
-4
src/include/nodes/plannodes.h
src/include/nodes/plannodes.h
+11
-11
src/include/optimizer/internal.h
src/include/optimizer/internal.h
+5
-5
src/include/optimizer/planmain.h
src/include/optimizer/planmain.h
+2
-2
No files found.
src/backend/catalog/heap.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.7
2 1999/02/03 21:15:54
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.7
3 1999/02/09 17:02:42
momjian Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -149,7 +149,7 @@ typedef struct tempRelList
...
@@ -149,7 +149,7 @@ typedef struct tempRelList
* array */
* array */
}
TempRelList
;
}
TempRelList
;
#define
TEMP
_REL_LIST_SIZE 32
#define
NONAME
_REL_LIST_SIZE 32
static
TempRelList
*
tempRels
=
NULL
;
static
TempRelList
*
tempRels
=
NULL
;
...
@@ -1392,7 +1392,7 @@ InitNoNameRelList(void)
...
@@ -1392,7 +1392,7 @@ InitNoNameRelList(void)
}
}
tempRels
=
(
TempRelList
*
)
malloc
(
sizeof
(
TempRelList
));
tempRels
=
(
TempRelList
*
)
malloc
(
sizeof
(
TempRelList
));
tempRels
->
size
=
TEMP
_REL_LIST_SIZE
;
tempRels
->
size
=
NONAME
_REL_LIST_SIZE
;
tempRels
->
rels
=
(
Relation
*
)
malloc
(
sizeof
(
Relation
)
*
tempRels
->
size
);
tempRels
->
rels
=
(
Relation
*
)
malloc
(
sizeof
(
Relation
)
*
tempRels
->
size
);
MemSet
(
tempRels
->
rels
,
0
,
sizeof
(
Relation
)
*
tempRels
->
size
);
MemSet
(
tempRels
->
rels
,
0
,
sizeof
(
Relation
)
*
tempRels
->
size
);
tempRels
->
num
=
0
;
tempRels
->
num
=
0
;
...
@@ -1436,7 +1436,7 @@ AddToNoNameRelList(Relation r)
...
@@ -1436,7 +1436,7 @@ AddToNoNameRelList(Relation r)
if
(
tempRels
->
num
==
tempRels
->
size
)
if
(
tempRels
->
num
==
tempRels
->
size
)
{
{
tempRels
->
size
+=
TEMP
_REL_LIST_SIZE
;
tempRels
->
size
+=
NONAME
_REL_LIST_SIZE
;
tempRels
->
rels
=
realloc
(
tempRels
->
rels
,
tempRels
->
rels
=
realloc
(
tempRels
->
rels
,
sizeof
(
Relation
)
*
tempRels
->
size
);
sizeof
(
Relation
)
*
tempRels
->
size
);
}
}
...
...
src/backend/commands/explain.c
View file @
318e593f
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*
*
* Copyright (c) 1994-5, Regents of the University of California
* Copyright (c) 1994-5, Regents of the University of California
*
*
* $Id: explain.c,v 1.3
0 1998/12/18 14:45:07 wieck
Exp $
* $Id: explain.c,v 1.3
1 1999/02/09 17:02:43 momjian
Exp $
*
*
*/
*/
#include <stdio.h>
#include <stdio.h>
...
@@ -176,8 +176,8 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
...
@@ -176,8 +176,8 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
case
T_IndexScan
:
case
T_IndexScan
:
pname
=
"Index Scan"
;
pname
=
"Index Scan"
;
break
;
break
;
case
T_
Temp
:
case
T_
Noname
:
pname
=
"
Temp
Scan"
;
pname
=
"
Noname
Scan"
;
break
;
break
;
case
T_Sort
:
case
T_Sort
:
pname
=
"Sort"
;
pname
=
"Sort"
;
...
...
src/backend/executor/execAmi.c
View file @
318e593f
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: execAmi.c,v 1.3
0 1999/02/02 03:44:23
momjian Exp $
* $Id: execAmi.c,v 1.3
1 1999/02/09 17:02:44
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
#include "executor/nodeAppend.h"
#include "executor/nodeAppend.h"
#include "executor/nodeSubplan.h"
#include "executor/nodeSubplan.h"
#include "executor/execdebug.h"
#include "executor/execdebug.h"
#include "optimizer/internal.h"
/* for _
TEMP
_RELATION_ID_ */
#include "optimizer/internal.h"
/* for _
NONAME
_RELATION_ID_ */
#include "access/genam.h"
#include "access/genam.h"
#include "access/heapam.h"
#include "access/heapam.h"
#include "catalog/heap.h"
#include "catalog/heap.h"
...
@@ -509,11 +509,11 @@ ExecCreatR(TupleDesc tupType,
...
@@ -509,11 +509,11 @@ ExecCreatR(TupleDesc tupType,
relDesc
=
NULL
;
relDesc
=
NULL
;
if
(
relationOid
==
_
TEMP
_RELATION_ID_
)
if
(
relationOid
==
_
NONAME
_RELATION_ID_
)
{
{
/* ----------------
/* ----------------
* create a temporary relation
* create a temporary relation
* (currently the planner always puts a _
TEMP
_RELATION_ID
* (currently the planner always puts a _
NONAME
_RELATION_ID
* in the relation argument so we expect this to be the case although
* in the relation argument so we expect this to be the case although
* it's possible that someday we'll get the name from
* it's possible that someday we'll get the name from
* from the range table.. -cim 10/12/89)
* from the range table.. -cim 10/12/89)
...
...
src/backend/executor/nodeMaterial.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.
19 1999/02/03 21:16:1
4 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.
20 1999/02/09 17:02:4
4 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#include "executor/nodeMaterial.h"
#include "executor/nodeMaterial.h"
#include "catalog/catalog.h"
#include "catalog/catalog.h"
#include "catalog/heap.h"
#include "catalog/heap.h"
#include "optimizer/internal.h"
/* for _
TEMP
_RELATION_ID_ */
#include "optimizer/internal.h"
/* for _
NONAME
_RELATION_ID_ */
#include "access/heapam.h"
#include "access/heapam.h"
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
...
@@ -265,7 +265,7 @@ ExecInitMaterial(Material *node, EState *estate, Plan *parent)
...
@@ -265,7 +265,7 @@ ExecInitMaterial(Material *node, EState *estate, Plan *parent)
/* ----------------
/* ----------------
* ExecCreatR wants it's second argument to be an object id of
* ExecCreatR wants it's second argument to be an object id of
* a relation in the range table or a _
TEMP
_RELATION_ID
* a relation in the range table or a _
NONAME
_RELATION_ID
* indicating that the relation is not in the range table.
* indicating that the relation is not in the range table.
*
*
* In the second case ExecCreatR creates a temp relation.
* In the second case ExecCreatR creates a temp relation.
...
@@ -277,7 +277,7 @@ ExecInitMaterial(Material *node, EState *estate, Plan *parent)
...
@@ -277,7 +277,7 @@ ExecInitMaterial(Material *node, EState *estate, Plan *parent)
* ----------------
* ----------------
*/
*/
/* len = ExecTargetListLength(node->plan.targetlist); */
/* len = ExecTargetListLength(node->plan.targetlist); */
tempDesc
=
ExecCreatR
(
tupType
,
_
TEMP
_RELATION_ID_
);
tempDesc
=
ExecCreatR
(
tupType
,
_
NONAME
_RELATION_ID_
);
/* ----------------
/* ----------------
* save the relation descriptor in the sortstate
* save the relation descriptor in the sortstate
...
...
src/backend/executor/nodeSort.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.1
6 1998/09/01 03:22:30
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.1
7 1999/02/09 17:02:45
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include "catalog/catalog.h"
#include "catalog/catalog.h"
#include "catalog/heap.h"
#include "catalog/heap.h"
#include "storage/bufmgr.h"
#include "storage/bufmgr.h"
#include "optimizer/internal.h"
/* for _
TEMP
_RELATION_ID_ */
#include "optimizer/internal.h"
/* for _
NONAME
_RELATION_ID_ */
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
* FormSortKeys(node)
* FormSortKeys(node)
...
...
src/backend/nodes/copyfuncs.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.6
4 1999/02/09 03:51:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.6
5 1999/02/09 17:02:46
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -372,36 +372,36 @@ _copyHashJoin(HashJoin *from)
...
@@ -372,36 +372,36 @@ _copyHashJoin(HashJoin *from)
/* ----------------
/* ----------------
* Copy
Temp
Fields
* Copy
Noname
Fields
*
*
* This function copies the fields of the
Temp
node. It is used by
* This function copies the fields of the
Noname
node. It is used by
* all the copy functions for classes which inherit from
Temp
.
* all the copy functions for classes which inherit from
Noname
.
* ----------------
* ----------------
*/
*/
static
void
static
void
Copy
TempFields
(
Temp
*
from
,
Temp
*
newnode
)
Copy
NonameFields
(
Noname
*
from
,
Noname
*
newnode
)
{
{
newnode
->
tempid
=
from
->
temp
id
;
newnode
->
nonameid
=
from
->
noname
id
;
newnode
->
keycount
=
from
->
keycount
;
newnode
->
keycount
=
from
->
keycount
;
return
;
return
;
}
}
/* ----------------
/* ----------------
* _copy
Temp
* _copy
Noname
* ----------------
* ----------------
*/
*/
static
Temp
*
static
Noname
*
_copy
Temp
(
Temp
*
from
)
_copy
Noname
(
Noname
*
from
)
{
{
Temp
*
newnode
=
makeNode
(
Temp
);
Noname
*
newnode
=
makeNode
(
Noname
);
/* ----------------
/* ----------------
* copy node superclass fields
* copy node superclass fields
* ----------------
* ----------------
*/
*/
CopyPlanFields
((
Plan
*
)
from
,
(
Plan
*
)
newnode
);
CopyPlanFields
((
Plan
*
)
from
,
(
Plan
*
)
newnode
);
Copy
Temp
Fields
(
from
,
newnode
);
Copy
Noname
Fields
(
from
,
newnode
);
return
newnode
;
return
newnode
;
}
}
...
@@ -420,7 +420,7 @@ _copyMaterial(Material *from)
...
@@ -420,7 +420,7 @@ _copyMaterial(Material *from)
* ----------------
* ----------------
*/
*/
CopyPlanFields
((
Plan
*
)
from
,
(
Plan
*
)
newnode
);
CopyPlanFields
((
Plan
*
)
from
,
(
Plan
*
)
newnode
);
Copy
TempFields
((
Temp
*
)
from
,
(
Temp
*
)
newnode
);
Copy
NonameFields
((
Noname
*
)
from
,
(
Noname
*
)
newnode
);
return
newnode
;
return
newnode
;
}
}
...
@@ -440,7 +440,7 @@ _copySort(Sort *from)
...
@@ -440,7 +440,7 @@ _copySort(Sort *from)
* ----------------
* ----------------
*/
*/
CopyPlanFields
((
Plan
*
)
from
,
(
Plan
*
)
newnode
);
CopyPlanFields
((
Plan
*
)
from
,
(
Plan
*
)
newnode
);
Copy
TempFields
((
Temp
*
)
from
,
(
Temp
*
)
newnode
);
Copy
NonameFields
((
Noname
*
)
from
,
(
Noname
*
)
newnode
);
return
newnode
;
return
newnode
;
}
}
...
@@ -511,7 +511,7 @@ _copyUnique(Unique *from)
...
@@ -511,7 +511,7 @@ _copyUnique(Unique *from)
* ----------------
* ----------------
*/
*/
CopyPlanFields
((
Plan
*
)
from
,
(
Plan
*
)
newnode
);
CopyPlanFields
((
Plan
*
)
from
,
(
Plan
*
)
newnode
);
Copy
TempFields
((
Temp
*
)
from
,
(
Temp
*
)
newnode
);
Copy
NonameFields
((
Noname
*
)
from
,
(
Noname
*
)
newnode
);
/* ----------------
/* ----------------
* copy remainder of node
* copy remainder of node
...
@@ -1688,8 +1688,8 @@ copyObject(void *from)
...
@@ -1688,8 +1688,8 @@ copyObject(void *from)
case
T_HashJoin
:
case
T_HashJoin
:
retval
=
_copyHashJoin
(
from
);
retval
=
_copyHashJoin
(
from
);
break
;
break
;
case
T_
Temp
:
case
T_
Noname
:
retval
=
_copy
Temp
(
from
);
retval
=
_copy
Noname
(
from
);
break
;
break
;
case
T_Material
:
case
T_Material
:
retval
=
_copyMaterial
(
from
);
retval
=
_copyMaterial
(
from
);
...
...
src/backend/nodes/freefuncs.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.
3 1999/02/09 03:51:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.
4 1999/02/09 17:02:49
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -298,32 +298,32 @@ _freeHashJoin(HashJoin *node)
...
@@ -298,32 +298,32 @@ _freeHashJoin(HashJoin *node)
/* ----------------
/* ----------------
* Free
Temp
Fields
* Free
Noname
Fields
*
*
* This function frees the fields of the
Temp
node. It is used by
* This function frees the fields of the
Noname
node. It is used by
* all the free functions for classes which inherit node
Temp
.
* all the free functions for classes which inherit node
Noname
.
* ----------------
* ----------------
*/
*/
static
void
static
void
Free
TempFields
(
Temp
*
node
)
Free
NonameFields
(
Noname
*
node
)
{
{
return
;
return
;
}
}
/* ----------------
/* ----------------
* _free
Temp
* _free
Noname
* ----------------
* ----------------
*/
*/
static
void
static
void
_free
Temp
(
Temp
*
node
)
_free
Noname
(
Noname
*
node
)
{
{
/* ----------------
/* ----------------
* free node superclass fields
* free node superclass fields
* ----------------
* ----------------
*/
*/
FreePlanFields
((
Plan
*
)
node
);
FreePlanFields
((
Plan
*
)
node
);
Free
Temp
Fields
(
node
);
Free
Noname
Fields
(
node
);
pfree
(
node
);
pfree
(
node
);
}
}
...
@@ -340,7 +340,7 @@ _freeMaterial(Material *node)
...
@@ -340,7 +340,7 @@ _freeMaterial(Material *node)
* ----------------
* ----------------
*/
*/
FreePlanFields
((
Plan
*
)
node
);
FreePlanFields
((
Plan
*
)
node
);
Free
TempFields
((
Temp
*
)
node
);
Free
NonameFields
((
Noname
*
)
node
);
pfree
(
node
);
pfree
(
node
);
}
}
...
@@ -358,7 +358,7 @@ _freeSort(Sort *node)
...
@@ -358,7 +358,7 @@ _freeSort(Sort *node)
* ----------------
* ----------------
*/
*/
FreePlanFields
((
Plan
*
)
node
);
FreePlanFields
((
Plan
*
)
node
);
Free
TempFields
((
Temp
*
)
node
);
Free
NonameFields
((
Noname
*
)
node
);
pfree
(
node
);
pfree
(
node
);
}
}
...
@@ -417,7 +417,7 @@ _freeUnique(Unique *node)
...
@@ -417,7 +417,7 @@ _freeUnique(Unique *node)
* ----------------
* ----------------
*/
*/
FreePlanFields
((
Plan
*
)
node
);
FreePlanFields
((
Plan
*
)
node
);
Free
TempFields
((
Temp
*
)
node
);
Free
NonameFields
((
Noname
*
)
node
);
/* ----------------
/* ----------------
* free remainder of node
* free remainder of node
...
@@ -1207,8 +1207,8 @@ freeObject(void *node)
...
@@ -1207,8 +1207,8 @@ freeObject(void *node)
case
T_HashJoin
:
case
T_HashJoin
:
_freeHashJoin
(
node
);
_freeHashJoin
(
node
);
break
;
break
;
case
T_
Temp
:
case
T_
Noname
:
_free
Temp
(
node
);
_free
Noname
(
node
);
break
;
break
;
case
T_Material
:
case
T_Material
:
_freeMaterial
(
node
);
_freeMaterial
(
node
);
...
...
src/backend/nodes/outfuncs.c
View file @
318e593f
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: outfuncs.c,v 1.6
6 1999/02/09 03:51:13
momjian Exp $
* $Id: outfuncs.c,v 1.6
7 1999/02/09 17:02:49
momjian Exp $
*
*
* NOTES
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
* Every (plan) node in POSTGRES has an associated "out" routine which
...
@@ -472,21 +472,21 @@ _outIndexScan(StringInfo str, IndexScan *node)
...
@@ -472,21 +472,21 @@ _outIndexScan(StringInfo str, IndexScan *node)
}
}
/*
/*
*
Temp
is a subclass of Plan
*
Noname
is a subclass of Plan
*/
*/
static
void
static
void
_out
Temp
(
StringInfo
str
,
Temp
*
node
)
_out
Noname
(
StringInfo
str
,
Noname
*
node
)
{
{
appendStringInfo
(
str
,
"
TEMP
"
);
appendStringInfo
(
str
,
"
NONAME
"
);
_outPlanInfo
(
str
,
(
Plan
*
)
node
);
_outPlanInfo
(
str
,
(
Plan
*
)
node
);
appendStringInfo
(
str
,
" :
temp
id %u :keycount %d "
,
appendStringInfo
(
str
,
" :
noname
id %u :keycount %d "
,
node
->
temp
id
,
node
->
noname
id
,
node
->
keycount
);
node
->
keycount
);
}
}
/*
/*
* Sort is a subclass of
Temp
* Sort is a subclass of
Noname
*/
*/
static
void
static
void
_outSort
(
StringInfo
str
,
Sort
*
node
)
_outSort
(
StringInfo
str
,
Sort
*
node
)
...
@@ -494,8 +494,8 @@ _outSort(StringInfo str, Sort *node)
...
@@ -494,8 +494,8 @@ _outSort(StringInfo str, Sort *node)
appendStringInfo
(
str
,
" SORT "
);
appendStringInfo
(
str
,
" SORT "
);
_outPlanInfo
(
str
,
(
Plan
*
)
node
);
_outPlanInfo
(
str
,
(
Plan
*
)
node
);
appendStringInfo
(
str
,
" :
temp
id %u :keycount %d "
,
appendStringInfo
(
str
,
" :
noname
id %u :keycount %d "
,
node
->
temp
id
,
node
->
noname
id
,
node
->
keycount
);
node
->
keycount
);
}
}
...
@@ -523,7 +523,7 @@ _outGroup(StringInfo str, Group *node)
...
@@ -523,7 +523,7 @@ _outGroup(StringInfo str, Group *node)
}
}
/*
/*
* For some reason, unique is a subclass of
Temp
.
* For some reason, unique is a subclass of
Noname
.
*/
*/
static
void
static
void
_outUnique
(
StringInfo
str
,
Unique
*
node
)
_outUnique
(
StringInfo
str
,
Unique
*
node
)
...
@@ -531,14 +531,14 @@ _outUnique(StringInfo str, Unique *node)
...
@@ -531,14 +531,14 @@ _outUnique(StringInfo str, Unique *node)
appendStringInfo
(
str
,
" UNIQUE "
);
appendStringInfo
(
str
,
" UNIQUE "
);
_outPlanInfo
(
str
,
(
Plan
*
)
node
);
_outPlanInfo
(
str
,
(
Plan
*
)
node
);
appendStringInfo
(
str
,
" :
temp
id %u :keycount %d "
,
appendStringInfo
(
str
,
" :
noname
id %u :keycount %d "
,
node
->
temp
id
,
node
->
noname
id
,
node
->
keycount
);
node
->
keycount
);
}
}
/*
/*
* Hash is a subclass of
Temp
* Hash is a subclass of
Noname
*/
*/
static
void
static
void
_outHash
(
StringInfo
str
,
Hash
*
node
)
_outHash
(
StringInfo
str
,
Hash
*
node
)
...
@@ -1517,8 +1517,8 @@ _outNode(StringInfo str, void *obj)
...
@@ -1517,8 +1517,8 @@ _outNode(StringInfo str, void *obj)
case
T_IndexScan
:
case
T_IndexScan
:
_outIndexScan
(
str
,
obj
);
_outIndexScan
(
str
,
obj
);
break
;
break
;
case
T_
Temp
:
case
T_
Noname
:
_out
Temp
(
str
,
obj
);
_out
Noname
(
str
,
obj
);
break
;
break
;
case
T_Sort
:
case
T_Sort
:
_outSort
(
str
,
obj
);
_outSort
(
str
,
obj
);
...
...
src/backend/nodes/print.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.
19 1999/01/27 00:36:28 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.
20 1999/02/09 17:02:49 momjian
Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
@@ -313,8 +313,8 @@ plannode_type(Plan *p)
...
@@ -313,8 +313,8 @@ plannode_type(Plan *p)
case
T_HashJoin
:
case
T_HashJoin
:
return
"HASHJOIN"
;
return
"HASHJOIN"
;
break
;
break
;
case
T_
Temp
:
case
T_
Noname
:
return
"
TEMP
"
;
return
"
NONAME
"
;
break
;
break
;
case
T_Material
:
case
T_Material
:
return
"MATERIAL"
;
return
"MATERIAL"
;
...
...
src/backend/nodes/readfuncs.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.5
1 1999/02/09 03:51:13
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.5
2 1999/02/09 17:02:50
momjian Exp $
*
*
* NOTES
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
* Most of the read functions for plan nodes are tested. (In fact, they
...
@@ -565,25 +565,25 @@ _readIndexScan()
...
@@ -565,25 +565,25 @@ _readIndexScan()
}
}
/* ----------------
/* ----------------
* _read
Temp
* _read
Noname
*
*
*
Temp
is a subclass of Plan
*
Noname
is a subclass of Plan
* ----------------
* ----------------
*/
*/
static
Temp
*
static
Noname
*
_read
Temp
()
_read
Noname
()
{
{
Temp
*
local_node
;
Noname
*
local_node
;
char
*
token
;
char
*
token
;
int
length
;
int
length
;
local_node
=
makeNode
(
Temp
);
local_node
=
makeNode
(
Noname
);
_getPlan
((
Plan
*
)
local_node
);
_getPlan
((
Plan
*
)
local_node
);
token
=
lsptok
(
NULL
,
&
length
);
/* eat :
temp
id */
token
=
lsptok
(
NULL
,
&
length
);
/* eat :
noname
id */
token
=
lsptok
(
NULL
,
&
length
);
/* get
temp
id */
token
=
lsptok
(
NULL
,
&
length
);
/* get
noname
id */
local_node
->
temp
id
=
atol
(
token
);
local_node
->
noname
id
=
atol
(
token
);
token
=
lsptok
(
NULL
,
&
length
);
/* eat :keycount */
token
=
lsptok
(
NULL
,
&
length
);
/* eat :keycount */
token
=
lsptok
(
NULL
,
&
length
);
/* get keycount */
token
=
lsptok
(
NULL
,
&
length
);
/* get keycount */
...
@@ -595,7 +595,7 @@ _readTemp()
...
@@ -595,7 +595,7 @@ _readTemp()
/* ----------------
/* ----------------
* _readSort
* _readSort
*
*
* Sort is a subclass of
Temp
* Sort is a subclass of
Noname
* ----------------
* ----------------
*/
*/
static
Sort
*
static
Sort
*
...
@@ -609,9 +609,9 @@ _readSort()
...
@@ -609,9 +609,9 @@ _readSort()
_getPlan
((
Plan
*
)
local_node
);
_getPlan
((
Plan
*
)
local_node
);
token
=
lsptok
(
NULL
,
&
length
);
/* eat :
temp
id */
token
=
lsptok
(
NULL
,
&
length
);
/* eat :
noname
id */
token
=
lsptok
(
NULL
,
&
length
);
/* get
temp
id */
token
=
lsptok
(
NULL
,
&
length
);
/* get
noname
id */
local_node
->
temp
id
=
atol
(
token
);
local_node
->
noname
id
=
atol
(
token
);
token
=
lsptok
(
NULL
,
&
length
);
/* eat :keycount */
token
=
lsptok
(
NULL
,
&
length
);
/* eat :keycount */
token
=
lsptok
(
NULL
,
&
length
);
/* get keycount */
token
=
lsptok
(
NULL
,
&
length
);
/* get keycount */
...
@@ -639,7 +639,7 @@ _readAgg()
...
@@ -639,7 +639,7 @@ _readAgg()
/* ----------------
/* ----------------
* _readUnique
* _readUnique
*
*
* For some reason, unique is a subclass of
Temp
.
* For some reason, unique is a subclass of
Noname
.
*/
*/
static
Unique
*
static
Unique
*
_readUnique
()
_readUnique
()
...
@@ -652,9 +652,9 @@ _readUnique()
...
@@ -652,9 +652,9 @@ _readUnique()
_getPlan
((
Plan
*
)
local_node
);
_getPlan
((
Plan
*
)
local_node
);
token
=
lsptok
(
NULL
,
&
length
);
/* eat :
temp
id */
token
=
lsptok
(
NULL
,
&
length
);
/* eat :
noname
id */
token
=
lsptok
(
NULL
,
&
length
);
/* get :
temp
id */
token
=
lsptok
(
NULL
,
&
length
);
/* get :
noname
id */
local_node
->
temp
id
=
atol
(
token
);
local_node
->
noname
id
=
atol
(
token
);
token
=
lsptok
(
NULL
,
&
length
);
/* eat :keycount */
token
=
lsptok
(
NULL
,
&
length
);
/* eat :keycount */
token
=
lsptok
(
NULL
,
&
length
);
/* get :keycount */
token
=
lsptok
(
NULL
,
&
length
);
/* get :keycount */
...
@@ -666,7 +666,7 @@ _readUnique()
...
@@ -666,7 +666,7 @@ _readUnique()
/* ----------------
/* ----------------
* _readHash
* _readHash
*
*
* Hash is a subclass of
Temp
* Hash is a subclass of
Noname
* ----------------
* ----------------
*/
*/
static
Hash
*
static
Hash
*
...
@@ -2070,8 +2070,8 @@ parsePlanString(void)
...
@@ -2070,8 +2070,8 @@ parsePlanString(void)
return_value
=
_readSeqScan
();
return_value
=
_readSeqScan
();
else
if
(
!
strncmp
(
token
,
"INDEXSCAN"
,
length
))
else
if
(
!
strncmp
(
token
,
"INDEXSCAN"
,
length
))
return_value
=
_readIndexScan
();
return_value
=
_readIndexScan
();
else
if
(
!
strncmp
(
token
,
"
TEMP
"
,
length
))
else
if
(
!
strncmp
(
token
,
"
NONAME
"
,
length
))
return_value
=
_read
Temp
();
return_value
=
_read
Noname
();
else
if
(
!
strncmp
(
token
,
"SORT"
,
length
))
else
if
(
!
strncmp
(
token
,
"SORT"
,
length
))
return_value
=
_readSort
();
return_value
=
_readSort
();
else
if
(
!
strncmp
(
token
,
"AGGREG"
,
length
))
else
if
(
!
strncmp
(
token
,
"AGGREG"
,
length
))
...
...
src/backend/optimizer/path/costsize.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.2
6 1999/02/03 20:15:3
2 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.2
7 1999/02/09 17:02:5
2 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -87,7 +87,7 @@ cost_seqscan(int relid, int relpages, int reltuples)
...
@@ -87,7 +87,7 @@ cost_seqscan(int relid, int relpages, int reltuples)
/*
/*
* cost of sequentially scanning a materialized temporary relation
* cost of sequentially scanning a materialized temporary relation
*/
*/
temp
+=
_
TEMP
_SCAN_COST_
;
temp
+=
_
NONAME
_SCAN_COST_
;
}
}
else
else
{
{
...
@@ -198,7 +198,7 @@ cost_sort(List *keys, int tuples, int width, bool noread)
...
@@ -198,7 +198,7 @@ cost_sort(List *keys, int tuples, int width, bool noread)
numTuples
*
base_log
((
double
)
pages
,
(
double
)
2
.
0
);
numTuples
*
base_log
((
double
)
pages
,
(
double
)
2
.
0
);
if
(
!
noread
)
if
(
!
noread
)
temp
=
temp
+
cost_seqscan
(
_
TEMP
_RELATION_ID_
,
npages
,
tuples
);
temp
=
temp
+
cost_seqscan
(
_
NONAME
_RELATION_ID_
,
npages
,
tuples
);
Assert
(
temp
>=
0
);
Assert
(
temp
>=
0
);
return
temp
;
return
temp
;
...
...
src/backend/optimizer/path/joinutils.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.1
2 1999/02/09 03:51:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.1
3 1999/02/09 17:02:55
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -325,8 +325,7 @@ new_join_pathkeys(List *outer_pathkeys,
...
@@ -325,8 +325,7 @@ new_join_pathkeys(List *outer_pathkeys,
foreach
(
i
,
outer_pathkeys
)
foreach
(
i
,
outer_pathkeys
)
{
{
outer_pathkey
=
lfirst
(
i
);
outer_pathkey
=
lfirst
(
i
);
x
=
new_join_pathkey
(
outer_pathkey
,
NIL
,
x
=
new_join_pathkey
(
outer_pathkey
,
NIL
,
join_rel_tlist
,
joinclauses
);
join_rel_tlist
,
joinclauses
);
if
(
x
!=
NIL
)
if
(
x
!=
NIL
)
t_list
=
lappend
(
t_list
,
x
);
t_list
=
lappend
(
t_list
,
x
);
}
}
...
@@ -421,7 +420,8 @@ new_matching_subkeys(Var *subkey,
...
@@ -421,7 +420,8 @@ new_matching_subkeys(Var *subkey,
foreach
(
i
,
joinclauses
)
foreach
(
i
,
joinclauses
)
{
{
joinclause
=
lfirst
(
i
);
joinclause
=
lfirst
(
i
);
tlist_other_var
=
matching_tlvar
(
other_join_clause_var
(
subkey
,
joinclause
),
tlist_other_var
=
matching_tlvar
(
other_join_clause_var
(
subkey
,
joinclause
),
join_rel_tlist
);
join_rel_tlist
);
if
(
tlist_other_var
&&
if
(
tlist_other_var
&&
...
...
src/backend/optimizer/plan/createplan.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.
39 1999/02/09 03:51:21
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.
40 1999/02/09 17:02:55
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -40,8 +40,8 @@
...
@@ -40,8 +40,8 @@
#include "optimizer/internal.h"
#include "optimizer/internal.h"
#define
TEMP
_SORT 1
#define
NONAME
_SORT 1
#define
TEMP
_MATERIAL 2
#define
NONAME
_MATERIAL 2
static
List
*
switch_outer
(
List
*
clauses
);
static
List
*
switch_outer
(
List
*
clauses
);
static
Scan
*
create_scan_node
(
Path
*
best_path
,
List
*
tlist
);
static
Scan
*
create_scan_node
(
Path
*
best_path
,
List
*
tlist
);
...
@@ -60,8 +60,8 @@ static HashJoin *create_hashjoin_node(HashPath *best_path, List *tlist,
...
@@ -60,8 +60,8 @@ static HashJoin *create_hashjoin_node(HashPath *best_path, List *tlist,
List
*
clauses
,
Plan
*
outer_node
,
List
*
outer_tlist
,
List
*
clauses
,
Plan
*
outer_node
,
List
*
outer_tlist
,
Plan
*
inner_node
,
List
*
inner_tlist
);
Plan
*
inner_node
,
List
*
inner_tlist
);
static
Node
*
fix_indxqual_references
(
Node
*
clause
,
Path
*
index_path
);
static
Node
*
fix_indxqual_references
(
Node
*
clause
,
Path
*
index_path
);
static
Temp
*
make_temp
(
List
*
tlist
,
List
*
keys
,
Oid
*
operators
,
static
Noname
*
make_noname
(
List
*
tlist
,
List
*
keys
,
Oid
*
operators
,
Plan
*
plan_node
,
int
temp
type
);
Plan
*
plan_node
,
int
noname
type
);
static
IndexScan
*
make_indexscan
(
List
*
qptlist
,
List
*
qpqual
,
Index
scanrelid
,
static
IndexScan
*
make_indexscan
(
List
*
qptlist
,
List
*
qpqual
,
Index
scanrelid
,
List
*
indxid
,
List
*
indxqual
,
List
*
indxqualorig
,
Cost
cost
);
List
*
indxid
,
List
*
indxqual
,
List
*
indxqualorig
,
Cost
cost
);
static
NestLoop
*
make_nestloop
(
List
*
qptlist
,
List
*
qpqual
,
Plan
*
lefttree
,
static
NestLoop
*
make_nestloop
(
List
*
qptlist
,
List
*
qpqual
,
Plan
*
lefttree
,
...
@@ -72,7 +72,7 @@ static Hash *make_hash(List *tlist, Var *hashkey, Plan *lefttree);
...
@@ -72,7 +72,7 @@ static Hash *make_hash(List *tlist, Var *hashkey, Plan *lefttree);
static
MergeJoin
*
make_mergejoin
(
List
*
tlist
,
List
*
qpqual
,
static
MergeJoin
*
make_mergejoin
(
List
*
tlist
,
List
*
qpqual
,
List
*
mergeclauses
,
Oid
opcode
,
Oid
*
rightorder
,
List
*
mergeclauses
,
Oid
opcode
,
Oid
*
rightorder
,
Oid
*
leftorder
,
Plan
*
righttree
,
Plan
*
lefttree
);
Oid
*
leftorder
,
Plan
*
righttree
,
Plan
*
lefttree
);
static
Material
*
make_material
(
List
*
tlist
,
Oid
temp
id
,
Plan
*
lefttree
,
static
Material
*
make_material
(
List
*
tlist
,
Oid
noname
id
,
Plan
*
lefttree
,
int
keycount
);
int
keycount
);
/*
/*
...
@@ -476,11 +476,11 @@ create_nestloop_node(JoinPath *best_path,
...
@@ -476,11 +476,11 @@ create_nestloop_node(JoinPath *best_path,
}
}
else
if
(
IsA_Join
(
inner_node
))
else
if
(
IsA_Join
(
inner_node
))
{
{
inner_node
=
(
Plan
*
)
make_
temp
(
inner_tlist
,
inner_node
=
(
Plan
*
)
make_
noname
(
inner_tlist
,
NIL
,
NIL
,
NULL
,
NULL
,
inner_node
,
inner_node
,
TEMP
_MATERIAL
);
NONAME
_MATERIAL
);
}
}
join_node
=
make_nestloop
(
tlist
,
join_node
=
make_nestloop
(
tlist
,
...
@@ -545,11 +545,11 @@ create_mergejoin_node(MergePath *best_path,
...
@@ -545,11 +545,11 @@ create_mergejoin_node(MergePath *best_path,
*/
*/
if
(
best_path
->
outersortkeys
)
if
(
best_path
->
outersortkeys
)
{
{
Temp
*
sorted_outer_node
=
make_temp
(
outer_tlist
,
Noname
*
sorted_outer_node
=
make_noname
(
outer_tlist
,
best_path
->
outersortkeys
,
best_path
->
outersortkeys
,
outer_order
,
outer_order
,
outer_node
,
outer_node
,
TEMP
_SORT
);
NONAME
_SORT
);
sorted_outer_node
->
plan
.
cost
=
outer_node
->
cost
;
sorted_outer_node
->
plan
.
cost
=
outer_node
->
cost
;
outer_node
=
(
Plan
*
)
sorted_outer_node
;
outer_node
=
(
Plan
*
)
sorted_outer_node
;
...
@@ -557,11 +557,11 @@ create_mergejoin_node(MergePath *best_path,
...
@@ -557,11 +557,11 @@ create_mergejoin_node(MergePath *best_path,
if
(
best_path
->
innersortkeys
)
if
(
best_path
->
innersortkeys
)
{
{
Temp
*
sorted_inner_node
=
make_temp
(
inner_tlist
,
Noname
*
sorted_inner_node
=
make_noname
(
inner_tlist
,
best_path
->
innersortkeys
,
best_path
->
innersortkeys
,
inner_order
,
inner_order
,
inner_node
,
inner_node
,
TEMP
_SORT
);
NONAME
_SORT
);
sorted_inner_node
->
plan
.
cost
=
outer_node
->
cost
;
sorted_inner_node
->
plan
.
cost
=
outer_node
->
cost
;
inner_node
=
(
Plan
*
)
sorted_inner_node
;
inner_node
=
(
Plan
*
)
sorted_inner_node
;
...
@@ -798,7 +798,7 @@ switch_outer(List *clauses)
...
@@ -798,7 +798,7 @@ switch_outer(List *clauses)
}
}
/*
/*
* set-
temp
-tlist-operators--
* set-
noname
-tlist-operators--
* Sets the key and keyop fields of resdom nodes in a target list.
* Sets the key and keyop fields of resdom nodes in a target list.
*
*
* 'tlist' is the target list
* 'tlist' is the target list
...
@@ -812,7 +812,7 @@ switch_outer(List *clauses)
...
@@ -812,7 +812,7 @@ switch_outer(List *clauses)
* Returns the modified target list.
* Returns the modified target list.
*/
*/
static
List
*
static
List
*
set_
temp
_tlist_operators
(
List
*
tlist
,
List
*
pathkeys
,
Oid
*
operators
)
set_
noname
_tlist_operators
(
List
*
tlist
,
List
*
pathkeys
,
Oid
*
operators
)
{
{
Node
*
keys
=
NULL
;
Node
*
keys
=
NULL
;
int
keyno
=
1
;
int
keyno
=
1
;
...
@@ -846,8 +846,8 @@ set_temp_tlist_operators(List *tlist, List *pathkeys, Oid *operators)
...
@@ -846,8 +846,8 @@ set_temp_tlist_operators(List *tlist, List *pathkeys, Oid *operators)
*****************************************************************************/
*****************************************************************************/
/*
/*
* make_
temp
--
* make_
noname
--
* Create plan nodes to sort or materialize relations into
temporaries
. The
* Create plan nodes to sort or materialize relations into
noname
. The
* result returned for a sort will look like (SEQSCAN(SORT(plan-node)))
* result returned for a sort will look like (SEQSCAN(SORT(plan-node)))
* or (SEQSCAN(MATERIAL(plan-node)))
* or (SEQSCAN(MATERIAL(plan-node)))
*
*
...
@@ -856,46 +856,46 @@ set_temp_tlist_operators(List *tlist, List *pathkeys, Oid *operators)
...
@@ -856,46 +856,46 @@ set_temp_tlist_operators(List *tlist, List *pathkeys, Oid *operators)
* 'operators' is the operators with which the sort or hash is to be done
* 'operators' is the operators with which the sort or hash is to be done
* (a list of operator OIDs)
* (a list of operator OIDs)
* 'plan-node' is the node which yields tuples for the sort
* 'plan-node' is the node which yields tuples for the sort
* '
temp
type' indicates which operation(sort or hash) to perform
* '
noname
type' indicates which operation(sort or hash) to perform
*/
*/
static
Temp
*
static
Noname
*
make_
temp
(
List
*
tlist
,
make_
noname
(
List
*
tlist
,
List
*
keys
,
List
*
keys
,
Oid
*
operators
,
Oid
*
operators
,
Plan
*
plan_node
,
Plan
*
plan_node
,
int
temp
type
)
int
noname
type
)
{
{
List
*
temp
_tlist
;
List
*
noname
_tlist
;
Temp
*
retval
=
NULL
;
Noname
*
retval
=
NULL
;
/* Create a new target list for the
temporary
, with keys set. */
/* Create a new target list for the
noname
, with keys set. */
temp_tlist
=
set_temp
_tlist_operators
(
new_unsorted_tlist
(
tlist
),
noname_tlist
=
set_noname
_tlist_operators
(
new_unsorted_tlist
(
tlist
),
keys
,
keys
,
operators
);
operators
);
switch
(
temp
type
)
switch
(
noname
type
)
{
{
case
TEMP
_SORT
:
case
NONAME
_SORT
:
retval
=
(
Temp
*
)
make_seqscan
(
tlist
,
retval
=
(
Noname
*
)
make_seqscan
(
tlist
,
NIL
,
NIL
,
_
TEMP
_RELATION_ID_
,
_
NONAME
_RELATION_ID_
,
(
Plan
*
)
make_sort
(
temp
_tlist
,
(
Plan
*
)
make_sort
(
noname
_tlist
,
_
TEMP
_RELATION_ID_
,
_
NONAME
_RELATION_ID_
,
plan_node
,
plan_node
,
length
(
keys
)));
length
(
keys
)));
break
;
break
;
case
TEMP
_MATERIAL
:
case
NONAME
_MATERIAL
:
retval
=
(
Temp
*
)
make_seqscan
(
tlist
,
retval
=
(
Noname
*
)
make_seqscan
(
tlist
,
NIL
,
NIL
,
_
TEMP
_RELATION_ID_
,
_
NONAME
_RELATION_ID_
,
(
Plan
*
)
make_material
(
temp
_tlist
,
(
Plan
*
)
make_material
(
noname
_tlist
,
_
TEMP
_RELATION_ID_
,
_
NONAME
_RELATION_ID_
,
plan_node
,
plan_node
,
length
(
keys
)));
length
(
keys
)));
break
;
break
;
default:
default:
elog
(
ERROR
,
"make_
temp: unknown temp type %d"
,
temp
type
);
elog
(
ERROR
,
"make_
noname: unknown noname type %d"
,
noname
type
);
}
}
return
retval
;
return
retval
;
...
@@ -1049,7 +1049,7 @@ make_mergejoin(List *tlist,
...
@@ -1049,7 +1049,7 @@ make_mergejoin(List *tlist,
}
}
Sort
*
Sort
*
make_sort
(
List
*
tlist
,
Oid
temp
id
,
Plan
*
lefttree
,
int
keycount
)
make_sort
(
List
*
tlist
,
Oid
noname
id
,
Plan
*
lefttree
,
int
keycount
)
{
{
Sort
*
node
=
makeNode
(
Sort
);
Sort
*
node
=
makeNode
(
Sort
);
Plan
*
plan
=
&
node
->
plan
;
Plan
*
plan
=
&
node
->
plan
;
...
@@ -1060,7 +1060,7 @@ make_sort(List *tlist, Oid tempid, Plan *lefttree, int keycount)
...
@@ -1060,7 +1060,7 @@ make_sort(List *tlist, Oid tempid, Plan *lefttree, int keycount)
plan
->
qual
=
NIL
;
plan
->
qual
=
NIL
;
plan
->
lefttree
=
lefttree
;
plan
->
lefttree
=
lefttree
;
plan
->
righttree
=
NULL
;
plan
->
righttree
=
NULL
;
node
->
tempid
=
temp
id
;
node
->
nonameid
=
noname
id
;
node
->
keycount
=
keycount
;
node
->
keycount
=
keycount
;
return
node
;
return
node
;
...
@@ -1068,7 +1068,7 @@ make_sort(List *tlist, Oid tempid, Plan *lefttree, int keycount)
...
@@ -1068,7 +1068,7 @@ make_sort(List *tlist, Oid tempid, Plan *lefttree, int keycount)
static
Material
*
static
Material
*
make_material
(
List
*
tlist
,
make_material
(
List
*
tlist
,
Oid
temp
id
,
Oid
noname
id
,
Plan
*
lefttree
,
Plan
*
lefttree
,
int
keycount
)
int
keycount
)
{
{
...
@@ -1081,7 +1081,7 @@ make_material(List *tlist,
...
@@ -1081,7 +1081,7 @@ make_material(List *tlist,
plan
->
qual
=
NIL
;
plan
->
qual
=
NIL
;
plan
->
lefttree
=
lefttree
;
plan
->
lefttree
=
lefttree
;
plan
->
righttree
=
NULL
;
plan
->
righttree
=
NULL
;
node
->
tempid
=
temp
id
;
node
->
nonameid
=
noname
id
;
node
->
keycount
=
keycount
;
node
->
keycount
=
keycount
;
return
node
;
return
node
;
...
@@ -1145,7 +1145,7 @@ make_unique(List *tlist, Plan *lefttree, char *uniqueAttr)
...
@@ -1145,7 +1145,7 @@ make_unique(List *tlist, Plan *lefttree, char *uniqueAttr)
plan
->
qual
=
NIL
;
plan
->
qual
=
NIL
;
plan
->
lefttree
=
lefttree
;
plan
->
lefttree
=
lefttree
;
plan
->
righttree
=
NULL
;
plan
->
righttree
=
NULL
;
node
->
tempid
=
_TEMP
_RELATION_ID_
;
node
->
nonameid
=
_NONAME
_RELATION_ID_
;
node
->
keycount
=
0
;
node
->
keycount
=
0
;
if
(
strcmp
(
uniqueAttr
,
"*"
)
==
0
)
if
(
strcmp
(
uniqueAttr
,
"*"
)
==
0
)
node
->
uniqueAttr
=
NULL
;
node
->
uniqueAttr
=
NULL
;
...
...
src/backend/optimizer/plan/planmain.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.
29 1998/10/01 02:03:59 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.
30 1999/02/09 17:03:00 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -478,7 +478,7 @@ make_groupPlan(List **tlist,
...
@@ -478,7 +478,7 @@ make_groupPlan(List **tlist,
}
}
sortplan
=
make_sort
(
sort_tlist
,
sortplan
=
make_sort
(
sort_tlist
,
_
TEMP
_RELATION_ID_
,
_
NONAME
_RELATION_ID_
,
subplan
,
subplan
,
numCols
);
numCols
);
sortplan
->
plan
.
cost
=
subplan
->
cost
;
/* XXX assume no cost */
sortplan
->
plan
.
cost
=
subplan
->
cost
;
/* XXX assume no cost */
...
...
src/backend/optimizer/plan/planner.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.4
2 1999/02/03 21:16:36
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.4
3 1999/02/09 17:03:01
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -399,7 +399,7 @@ make_sortplan(List *tlist, List *sortcls, Plan *plannode)
...
@@ -399,7 +399,7 @@ make_sortplan(List *tlist, List *sortcls, Plan *plannode)
}
}
sortplan
=
(
Plan
*
)
make_sort
(
temp_tlist
,
sortplan
=
(
Plan
*
)
make_sort
(
temp_tlist
,
_
TEMP
_RELATION_ID_
,
_
NONAME
_RELATION_ID_
,
(
Plan
*
)
plannode
,
(
Plan
*
)
plannode
,
length
(
sortcls
));
length
(
sortcls
));
...
...
src/backend/optimizer/plan/setrefs.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.3
7 1999/02/03 21:16:38
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.3
8 1999/02/09 17:03:01
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -34,14 +34,14 @@
...
@@ -34,14 +34,14 @@
#include "optimizer/tlist.h"
#include "optimizer/tlist.h"
static
void
set_join_tlist_references
(
Join
*
join
);
static
void
set_join_tlist_references
(
Join
*
join
);
static
void
set_
tempscan_tlist_references
(
SeqScan
*
temp
scan
);
static
void
set_
nonamescan_tlist_references
(
SeqScan
*
noname
scan
);
static
void
set_
temp_tlist_references
(
Temp
*
temp
);
static
void
set_
noname_tlist_references
(
Noname
*
noname
);
static
List
*
replace_clause_joinvar_refs
(
Expr
*
clause
,
static
List
*
replace_clause_joinvar_refs
(
Expr
*
clause
,
List
*
outer_tlist
,
List
*
inner_tlist
);
List
*
outer_tlist
,
List
*
inner_tlist
);
static
List
*
replace_subclause_joinvar_refs
(
List
*
clauses
,
static
List
*
replace_subclause_joinvar_refs
(
List
*
clauses
,
List
*
outer_tlist
,
List
*
inner_tlist
);
List
*
outer_tlist
,
List
*
inner_tlist
);
static
Var
*
replace_joinvar_refs
(
Var
*
var
,
List
*
outer_tlist
,
List
*
inner_tlist
);
static
Var
*
replace_joinvar_refs
(
Var
*
var
,
List
*
outer_tlist
,
List
*
inner_tlist
);
static
List
*
tlist_
temp_references
(
Oid
temp
id
,
List
*
tlist
);
static
List
*
tlist_
noname_references
(
Oid
noname
id
,
List
*
tlist
);
static
void
replace_result_clause
(
Node
*
clause
,
List
*
subplanTargetList
);
static
void
replace_result_clause
(
Node
*
clause
,
List
*
subplanTargetList
);
static
bool
OperandIsInner
(
Node
*
opnd
,
int
inner_relid
);
static
bool
OperandIsInner
(
Node
*
opnd
,
int
inner_relid
);
static
List
*
replace_agg_clause
(
Node
*
expr
,
List
*
targetlist
);
static
List
*
replace_agg_clause
(
Node
*
expr
,
List
*
targetlist
);
...
@@ -74,10 +74,10 @@ set_tlist_references(Plan *plan)
...
@@ -74,10 +74,10 @@ set_tlist_references(Plan *plan)
if
(
IsA_Join
(
plan
))
if
(
IsA_Join
(
plan
))
set_join_tlist_references
((
Join
*
)
plan
);
set_join_tlist_references
((
Join
*
)
plan
);
else
if
(
IsA
(
plan
,
SeqScan
)
&&
plan
->
lefttree
&&
else
if
(
IsA
(
plan
,
SeqScan
)
&&
plan
->
lefttree
&&
IsA_
Temp
(
plan
->
lefttree
))
IsA_
Noname
(
plan
->
lefttree
))
set_
temp
scan_tlist_references
((
SeqScan
*
)
plan
);
set_
noname
scan_tlist_references
((
SeqScan
*
)
plan
);
else
if
(
IsA
(
plan
,
Sort
))
else
if
(
IsA
(
plan
,
Sort
))
set_
temp_tlist_references
((
Temp
*
)
plan
);
set_
noname_tlist_references
((
Noname
*
)
plan
);
else
if
(
IsA
(
plan
,
Result
))
else
if
(
IsA
(
plan
,
Result
))
set_result_tlist_references
((
Result
*
)
plan
);
set_result_tlist_references
((
Result
*
)
plan
);
else
if
(
IsA
(
plan
,
Hash
))
else
if
(
IsA
(
plan
,
Hash
))
...
@@ -136,49 +136,49 @@ set_join_tlist_references(Join *join)
...
@@ -136,49 +136,49 @@ set_join_tlist_references(Join *join)
}
}
/*
/*
* set-
temp
scan-tlist-references--
* set-
noname
scan-tlist-references--
* Modifies the target list of a node that scans a
temp
relation (i.e., a
* Modifies the target list of a node that scans a
noname
relation (i.e., a
* sort or hash node) so that the varnos refer to the child
temporary
.
* sort or hash node) so that the varnos refer to the child
noname
.
*
*
* '
temp
scan' is a seqscan node
* '
noname
scan' is a seqscan node
*
*
* Returns nothing of interest, but modifies internal fields of nodes.
* Returns nothing of interest, but modifies internal fields of nodes.
*
*
*/
*/
static
void
static
void
set_
tempscan_tlist_references
(
SeqScan
*
temp
scan
)
set_
nonamescan_tlist_references
(
SeqScan
*
noname
scan
)
{
{
Temp
*
temp
=
(
Temp
*
)
((
Plan
*
)
temp
scan
)
->
lefttree
;
Noname
*
noname
=
(
Noname
*
)
((
Plan
*
)
noname
scan
)
->
lefttree
;
((
Plan
*
)
tempscan
)
->
targetlist
=
tlist_temp_references
(
temp
->
temp
id
,
((
Plan
*
)
nonamescan
)
->
targetlist
=
tlist_noname_references
(
noname
->
noname
id
,
((
Plan
*
)
temp
scan
)
->
targetlist
);
((
Plan
*
)
noname
scan
)
->
targetlist
);
set_
temp_tlist_references
(
temp
);
set_
noname_tlist_references
(
noname
);
}
}
/*
/*
* set-
temp
-tlist-references--
* set-
noname
-tlist-references--
* The
temp
's vars are made consistent with (actually, identical to) the
* The
noname
's vars are made consistent with (actually, identical to) the
* modified version of the target list of the node from which
temp
node
* modified version of the target list of the node from which
noname
node
* receives its tuples.
* receives its tuples.
*
*
* '
temp' is a temp
(e.g., sort, hash) plan node
* '
noname' is a noname
(e.g., sort, hash) plan node
*
*
* Returns nothing of interest, but modifies internal fields of nodes.
* Returns nothing of interest, but modifies internal fields of nodes.
*
*
*/
*/
static
void
static
void
set_
temp_tlist_references
(
Temp
*
temp
)
set_
noname_tlist_references
(
Noname
*
noname
)
{
{
Plan
*
source
=
((
Plan
*
)
temp
)
->
lefttree
;
Plan
*
source
=
((
Plan
*
)
noname
)
->
lefttree
;
if
(
source
!=
NULL
)
if
(
source
!=
NULL
)
{
{
set_tlist_references
(
source
);
set_tlist_references
(
source
);
((
Plan
*
)
temp
)
->
targetlist
=
copy_vars
(((
Plan
*
)
temp
)
->
targetlist
,
((
Plan
*
)
noname
)
->
targetlist
=
copy_vars
(((
Plan
*
)
noname
)
->
targetlist
,
(
source
)
->
targetlist
);
(
source
)
->
targetlist
);
}
}
else
else
elog
(
ERROR
,
"calling set_
temp
_tlist_references with empty lefttree"
);
elog
(
ERROR
,
"calling set_
noname
_tlist_references with empty lefttree"
);
}
}
/*
/*
...
@@ -475,25 +475,25 @@ replace_joinvar_refs(Var *var, List *outer_tlist, List *inner_tlist)
...
@@ -475,25 +475,25 @@ replace_joinvar_refs(Var *var, List *outer_tlist, List *inner_tlist)
}
}
/*
/*
* tlist-
temp
-references--
* tlist-
noname
-references--
* Creates a new target list for a node that scans a
temp
relation,
* Creates a new target list for a node that scans a
noname
relation,
* setting the varnos to the id of the
temp
relation and setting varids
* setting the varnos to the id of the
noname
relation and setting varids
* if necessary (varids are only needed if this is a targetlist internal
* if necessary (varids are only needed if this is a targetlist internal
* to the tree, in which case the targetlist entry always contains a var
* to the tree, in which case the targetlist entry always contains a var
* node, so we can just copy it from the
temp
).
* node, so we can just copy it from the
noname
).
*
*
* '
tempid' is the id of the temp
relation
* '
nonameid' is the id of the noname
relation
* 'tlist' is the target list to be modified
* 'tlist' is the target list to be modified
*
*
* Returns new target list
* Returns new target list
*
*
*/
*/
static
List
*
static
List
*
tlist_
temp_references
(
Oid
temp
id
,
tlist_
noname_references
(
Oid
noname
id
,
List
*
tlist
)
List
*
tlist
)
{
{
List
*
t_list
=
NIL
;
List
*
t_list
=
NIL
;
TargetEntry
*
temp
=
(
TargetEntry
*
)
NULL
;
TargetEntry
*
noname
=
(
TargetEntry
*
)
NULL
;
TargetEntry
*
xtl
=
NULL
;
TargetEntry
*
xtl
=
NULL
;
List
*
entry
;
List
*
entry
;
...
@@ -507,16 +507,16 @@ tlist_temp_references(Oid tempid,
...
@@ -507,16 +507,16 @@ tlist_temp_references(Oid tempid,
else
else
oattno
=
0
;
oattno
=
0
;
temp
=
makeTargetEntry
(
xtl
->
resdom
,
noname
=
makeTargetEntry
(
xtl
->
resdom
,
(
Node
*
)
makeVar
(
temp
id
,
(
Node
*
)
makeVar
(
noname
id
,
xtl
->
resdom
->
resno
,
xtl
->
resdom
->
resno
,
xtl
->
resdom
->
restype
,
xtl
->
resdom
->
restype
,
xtl
->
resdom
->
restypmod
,
xtl
->
resdom
->
restypmod
,
0
,
0
,
temp
id
,
noname
id
,
oattno
));
oattno
));
t_list
=
lappend
(
t_list
,
temp
);
t_list
=
lappend
(
t_list
,
noname
);
}
}
return
t_list
;
return
t_list
;
}
}
...
...
src/backend/optimizer/util/relnode.c
View file @
318e593f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.1
0 1999/02/03 20:15:43
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.1
1 1999/02/09 17:03:01
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -70,8 +70,8 @@ get_base_rel(Query *root, int relid)
...
@@ -70,8 +70,8 @@ get_base_rel(Query *root, int relid)
* If the relation is a materialized relation, assume
* If the relation is a materialized relation, assume
* constants for sizes.
* constants for sizes.
*/
*/
rel
->
pages
=
_
TEMP
_RELATION_PAGES_
;
rel
->
pages
=
_
NONAME
_RELATION_PAGES_
;
rel
->
tuples
=
_
TEMP
_RELATION_TUPLES_
;
rel
->
tuples
=
_
NONAME
_RELATION_TUPLES_
;
}
}
else
else
...
...
src/include/nodes/nodes.h
View file @
318e593f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: nodes.h,v 1.4
0 1999/02/09 03:51:4
1 momjian Exp $
* $Id: nodes.h,v 1.4
1 1999/02/09 17:03:1
1 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -38,7 +38,7 @@ typedef enum NodeTag
...
@@ -38,7 +38,7 @@ typedef enum NodeTag
T_NestLoop
,
T_NestLoop
,
T_MergeJoin
,
T_MergeJoin
,
T_HashJoin
,
T_HashJoin
,
T_
Temp
,
T_
Noname
,
T_Material
,
T_Material
,
T_Sort
,
T_Sort
,
T_Agg
,
T_Agg
,
...
@@ -251,8 +251,8 @@ typedef struct Node
...
@@ -251,8 +251,8 @@ typedef struct Node
(nodeTag(j)==T_Join || nodeTag(j)==T_NestLoop || \
(nodeTag(j)==T_Join || nodeTag(j)==T_NestLoop || \
nodeTag(j)==T_MergeJoin || nodeTag(j)==T_HashJoin)
nodeTag(j)==T_MergeJoin || nodeTag(j)==T_HashJoin)
#define IsA_
Temp
(t) \
#define IsA_
Noname
(t) \
(nodeTag(t)==T_
Temp
|| nodeTag(t)==T_Material || nodeTag(t)==T_Sort || \
(nodeTag(t)==T_
Noname
|| nodeTag(t)==T_Material || nodeTag(t)==T_Sort || \
nodeTag(t)==T_Unique)
nodeTag(t)==T_Unique)
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
...
...
src/include/nodes/plannodes.h
View file @
318e593f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: plannodes.h,v 1.2
0 1999/01/23 23:28:09
momjian Exp $
* $Id: plannodes.h,v 1.2
1 1999/02/09 17:03:12
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -262,15 +262,15 @@ typedef struct Group
...
@@ -262,15 +262,15 @@ typedef struct Group
/*
/*
* ==========
* ==========
*
Temp
nodes
*
Noname
nodes
* ==========
* ==========
*/
*/
typedef
struct
Temp
typedef
struct
Noname
{
{
Plan
plan
;
Plan
plan
;
Oid
temp
id
;
Oid
noname
id
;
int
keycount
;
int
keycount
;
}
Temp
;
}
Noname
;
/* ----------------
/* ----------------
* materialization node
* materialization node
...
@@ -278,8 +278,8 @@ typedef struct Temp
...
@@ -278,8 +278,8 @@ typedef struct Temp
*/
*/
typedef
struct
Material
typedef
struct
Material
{
{
Plan
plan
;
/*
temp
node flattened out */
Plan
plan
;
/*
noname
node flattened out */
Oid
temp
id
;
Oid
noname
id
;
int
keycount
;
int
keycount
;
MaterialState
*
matstate
;
MaterialState
*
matstate
;
}
Material
;
}
Material
;
...
@@ -290,8 +290,8 @@ typedef struct Material
...
@@ -290,8 +290,8 @@ typedef struct Material
*/
*/
typedef
struct
Sort
typedef
struct
Sort
{
{
Plan
plan
;
/*
temp
node flattened out */
Plan
plan
;
/*
noname
node flattened out */
Oid
temp
id
;
Oid
noname
id
;
int
keycount
;
int
keycount
;
SortState
*
sortstate
;
SortState
*
sortstate
;
void
*
psortstate
;
void
*
psortstate
;
...
@@ -304,8 +304,8 @@ typedef struct Sort
...
@@ -304,8 +304,8 @@ typedef struct Sort
*/
*/
typedef
struct
Unique
typedef
struct
Unique
{
{
Plan
plan
;
/*
temp
node flattened out */
Plan
plan
;
/*
noname
node flattened out */
Oid
temp
id
;
Oid
noname
id
;
int
keycount
;
int
keycount
;
char
*
uniqueAttr
;
/* NULL if all attrs, or unique attribute
char
*
uniqueAttr
;
/* NULL if all attrs, or unique attribute
* name */
* name */
...
...
src/include/optimizer/internal.h
View file @
318e593f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: internal.h,v 1.1
2 1999/02/02 03:45:2
4 momjian Exp $
* $Id: internal.h,v 1.1
3 1999/02/09 17:03:1
4 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -41,12 +41,12 @@
...
@@ -41,12 +41,12 @@
/* The cost of sequentially scanning a materialized temporary relation
/* The cost of sequentially scanning a materialized temporary relation
*/
*/
#define _
TEMP
_SCAN_COST_ 10
#define _
NONAME
_SCAN_COST_ 10
/* The number of pages and tuples in a materialized relation
/* The number of pages and tuples in a materialized relation
*/
*/
#define _
TEMP
_RELATION_PAGES_ 1
#define _
NONAME
_RELATION_PAGES_ 1
#define _
TEMP
_RELATION_TUPLES_ 10
#define _
NONAME
_RELATION_TUPLES_ 10
/* The length of a variable-length field in bytes
/* The length of a variable-length field in bytes
*/
*/
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
/* Identifier for (sort) temp relations */
/* Identifier for (sort) temp relations */
/* used to be -1 */
/* used to be -1 */
#define _
TEMP
_RELATION_ID_ InvalidOid
#define _
NONAME
_RELATION_ID_ InvalidOid
/* Identifier for invalid relation OIDs and attribute numbers for use by
/* Identifier for invalid relation OIDs and attribute numbers for use by
* selectivity functions
* selectivity functions
...
...
src/include/optimizer/planmain.h
View file @
318e593f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: planmain.h,v 1.
19 1999/02/02 17:46:16
momjian Exp $
* $Id: planmain.h,v 1.
20 1999/02/09 17:03:14
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -31,7 +31,7 @@ extern Plan *query_planner(Query *root,
...
@@ -31,7 +31,7 @@ extern Plan *query_planner(Query *root,
extern
Plan
*
create_plan
(
Path
*
best_path
);
extern
Plan
*
create_plan
(
Path
*
best_path
);
extern
SeqScan
*
make_seqscan
(
List
*
qptlist
,
List
*
qpqual
,
Index
scanrelid
,
extern
SeqScan
*
make_seqscan
(
List
*
qptlist
,
List
*
qpqual
,
Index
scanrelid
,
Plan
*
lefttree
);
Plan
*
lefttree
);
extern
Sort
*
make_sort
(
List
*
tlist
,
Oid
temp
id
,
Plan
*
lefttree
,
extern
Sort
*
make_sort
(
List
*
tlist
,
Oid
noname
id
,
Plan
*
lefttree
,
int
keycount
);
int
keycount
);
extern
Agg
*
make_agg
(
List
*
tlist
,
Plan
*
lefttree
);
extern
Agg
*
make_agg
(
List
*
tlist
,
Plan
*
lefttree
);
extern
Group
*
make_group
(
List
*
tlist
,
bool
tuplePerGroup
,
int
ngrp
,
extern
Group
*
make_group
(
List
*
tlist
,
bool
tuplePerGroup
,
int
ngrp
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment