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
18fbe414
Commit
18fbe414
authored
Feb 04, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More optimizer renaming HInfo -> HashInfo.
parent
9322950a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
61 additions
and
61 deletions
+61
-61
src/backend/nodes/copyfuncs.c
src/backend/nodes/copyfuncs.c
+7
-7
src/backend/nodes/equalfuncs.c
src/backend/nodes/equalfuncs.c
+6
-6
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+5
-5
src/backend/nodes/readfuncs.c
src/backend/nodes/readfuncs.c
+8
-8
src/backend/optimizer/README
src/backend/optimizer/README
+6
-5
src/backend/optimizer/path/hashutils.c
src/backend/optimizer/path/hashutils.c
+8
-8
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/path/joinpath.c
+3
-3
src/backend/optimizer/path/prune.c
src/backend/optimizer/path/prune.c
+4
-5
src/backend/optimizer/util/pathnode.c
src/backend/optimizer/util/pathnode.c
+3
-3
src/include/nodes/nodes.h
src/include/nodes/nodes.h
+2
-2
src/include/nodes/relation.h
src/include/nodes/relation.h
+9
-9
No files found.
src/backend/nodes/copyfuncs.c
View file @
18fbe414
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.
59 1999/02/03 21:16:17
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.
60 1999/02/04 01:46:53
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1378,13 +1378,13 @@ _copyJoinMethod(JoinMethod *from)
}
/* ----------------
* _copyHInfo
* _copyH
ash
Info
* ----------------
*/
static
HInfo
*
_copyH
Info
(
H
Info
*
from
)
static
H
ash
Info
*
_copyH
ashInfo
(
Hash
Info
*
from
)
{
H
Info
*
newnode
=
makeNode
(
H
Info
);
H
ashInfo
*
newnode
=
makeNode
(
Hash
Info
);
/* ----------------
* copy remainder of node
...
...
@@ -1797,8 +1797,8 @@ copyObject(void *from)
case
T_JoinMethod
:
retval
=
_copyJoinMethod
(
from
);
break
;
case
T_HInfo
:
retval
=
_copyHInfo
(
from
);
case
T_H
ash
Info
:
retval
=
_copyH
ash
Info
(
from
);
break
;
case
T_MInfo
:
retval
=
_copyMInfo
(
from
);
...
...
src/backend/nodes/equalfuncs.c
View file @
18fbe414
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.2
2 1999/02/03 20:15:22
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.2
3 1999/02/04 01:46:54
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -476,10 +476,10 @@ _equalMergeOrder(MergeOrder *a, MergeOrder *b)
}
static
bool
_equalH
Info
(
HInfo
*
a
,
H
Info
*
b
)
_equalH
ashInfo
(
HashInfo
*
a
,
Hash
Info
*
b
)
{
Assert
(
IsA
(
a
,
HInfo
));
Assert
(
IsA
(
b
,
HInfo
));
Assert
(
IsA
(
a
,
H
ash
Info
));
Assert
(
IsA
(
b
,
H
ash
Info
));
if
(
a
->
hashop
!=
b
->
hashop
)
return
false
;
...
...
@@ -696,8 +696,8 @@ equal(void *a, void *b)
case
T_MergeOrder
:
retval
=
_equalMergeOrder
(
a
,
b
);
break
;
case
T_HInfo
:
retval
=
_equalHInfo
(
a
,
b
);
case
T_H
ash
Info
:
retval
=
_equalH
ash
Info
(
a
,
b
);
break
;
case
T_IndexScan
:
retval
=
_equalIndexScan
(
a
,
b
);
...
...
src/backend/nodes/outfuncs.c
View file @
18fbe414
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: outfuncs.c,v 1.6
3 1999/02/03 20:15:22
momjian Exp $
* $Id: outfuncs.c,v 1.6
4 1999/02/04 01:46:54
momjian Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
...
...
@@ -1137,10 +1137,10 @@ _outJoinMethod(StringInfo str, JoinMethod *node)
}
/*
* HInfo is a subclass of JoinMethod.
* H
ash
Info is a subclass of JoinMethod.
*/
static
void
_outH
Info
(
StringInfo
str
,
H
Info
*
node
)
_outH
ashInfo
(
StringInfo
str
,
Hash
Info
*
node
)
{
appendStringInfo
(
str
,
" HASHINFO :hashop %u :jmkeys "
,
node
->
hashop
);
_outNode
(
str
,
node
->
jmethod
.
jmkeys
);
...
...
@@ -1578,8 +1578,8 @@ _outNode(StringInfo str, void *obj)
case
T_JoinMethod
:
_outJoinMethod
(
str
,
obj
);
break
;
case
T_HInfo
:
_outHInfo
(
str
,
obj
);
case
T_H
ash
Info
:
_outH
ash
Info
(
str
,
obj
);
break
;
case
T_JoinInfo
:
_outJoinInfo
(
str
,
obj
);
...
...
src/backend/nodes/readfuncs.c
View file @
18fbe414
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.4
6 1999/02/03 21:16:18
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.4
7 1999/02/04 01:46:54
momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
...
...
@@ -1906,19 +1906,19 @@ _readJoinMethod()
}
/* ----------------
* _readHInfo
* _readH
ash
Info
*
* HInfo is a subclass of JoinMethod.
* H
ash
Info is a subclass of JoinMethod.
* ----------------
*/
static
HInfo
*
_readHInfo
()
static
H
ash
Info
*
_readH
ash
Info
()
{
HInfo
*
local_node
;
H
ash
Info
*
local_node
;
char
*
token
;
int
length
;
local_node
=
makeNode
(
HInfo
);
local_node
=
makeNode
(
H
ash
Info
);
token
=
lsptok
(
NULL
,
&
length
);
/* get :hashop */
token
=
lsptok
(
NULL
,
&
length
);
/* now read it */
...
...
@@ -2094,7 +2094,7 @@ parsePlanString(void)
else
if
(
!
strncmp
(
token
,
"JOININFO"
,
length
))
return_value
=
_readJoinInfo
();
else
if
(
!
strncmp
(
token
,
"HINFO"
,
length
))
return_value
=
_readHInfo
();
return_value
=
_readH
ash
Info
();
else
if
(
!
strncmp
(
token
,
"ITER"
,
length
))
return_value
=
_readIter
();
else
if
(
!
strncmp
(
token
,
"QUERY"
,
length
))
...
...
src/backend/optimizer/README
View file @
18fbe414
...
...
@@ -93,8 +93,9 @@ planner()
Optimizer Structures
--------------------
Path - info about every way to access a relation(sequential, index)
PathOrder - info about every ordering (sort, merge of relations)
RelOptInfo - info about every relation
JoinInfo - info about join combinations
RestrictInfo - info about restrictions
RelOptInfo - info about every relation
RestrictInfo - info about restrictions
JoinInfo - info about join combinations
Path - info about every way to access a relation(sequential, index)
PathOrder - info about every ordering (sort, merge of relations)
src/backend/optimizer/path/hashutils.c
View file @
18fbe414
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.
9 1999/02/03 21:16:25
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.
10 1999/02/04 01:46:57
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -20,7 +20,7 @@
#include "optimizer/clauses.h"
static
HInfo
*
match_hashop_hashinfo
(
Oid
hashop
,
List
*
hashinfo_list
);
static
H
ash
Info
*
match_hashop_hashinfo
(
Oid
hashop
,
List
*
hashinfo_list
);
/*
* group-clauses-by-hashop--
...
...
@@ -54,7 +54,7 @@ group_clauses_by_hashop(List *restrictinfo_list,
*/
if
(
hashjoinop
)
{
H
Info
*
xhashinfo
=
(
H
Info
*
)
NULL
;
H
ashInfo
*
xhashinfo
=
(
Hash
Info
*
)
NULL
;
Expr
*
clause
=
restrictinfo
->
clause
;
Var
*
leftop
=
get_leftop
(
clause
);
Var
*
rightop
=
get_rightop
(
clause
);
...
...
@@ -77,7 +77,7 @@ group_clauses_by_hashop(List *restrictinfo_list,
if
(
xhashinfo
==
NULL
)
{
xhashinfo
=
makeNode
(
HInfo
);
xhashinfo
=
makeNode
(
H
ash
Info
);
xhashinfo
->
hashop
=
hashjoinop
;
xhashinfo
->
jmethod
.
jmkeys
=
NIL
;
...
...
@@ -105,21 +105,21 @@ group_clauses_by_hashop(List *restrictinfo_list,
* Returns the node if it exists.
*
*/
static
HInfo
*
static
H
ash
Info
*
match_hashop_hashinfo
(
Oid
hashop
,
List
*
hashinfo_list
)
{
Oid
key
=
0
;
H
Info
*
xhashinfo
=
(
H
Info
*
)
NULL
;
H
ashInfo
*
xhashinfo
=
(
Hash
Info
*
)
NULL
;
List
*
i
=
NIL
;
foreach
(
i
,
hashinfo_list
)
{
xhashinfo
=
(
HInfo
*
)
lfirst
(
i
);
xhashinfo
=
(
H
ash
Info
*
)
lfirst
(
i
);
key
=
xhashinfo
->
hashop
;
if
(
hashop
==
key
)
{
/* found */
return
xhashinfo
;
/* should be a hashinfo node ! */
}
}
return
(
HInfo
*
)
NIL
;
return
(
H
ash
Info
*
)
NIL
;
}
src/backend/optimizer/path/joinpath.c
View file @
18fbe414
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.1
2 1999/02/03 21:16:2
7 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.1
3 1999/02/04 01:46:5
7 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -579,7 +579,7 @@ hash_inner_and_outer(RelOptInfo * joinrel,
RelOptInfo
*
innerrel
,
List
*
hashinfo_list
)
{
H
Info
*
xhashinfo
=
(
H
Info
*
)
NULL
;
H
ashInfo
*
xhashinfo
=
(
Hash
Info
*
)
NULL
;
List
*
hjoin_list
=
NIL
;
HashPath
*
temp_node
=
(
HashPath
*
)
NULL
;
List
*
i
=
NIL
;
...
...
@@ -589,7 +589,7 @@ hash_inner_and_outer(RelOptInfo * joinrel,
foreach
(
i
,
hashinfo_list
)
{
xhashinfo
=
(
HInfo
*
)
lfirst
(
i
);
xhashinfo
=
(
H
ash
Info
*
)
lfirst
(
i
);
outerkeys
=
extract_path_keys
(((
JoinMethod
*
)
xhashinfo
)
->
jmkeys
,
outerrel
->
targetlist
,
OUTER
);
...
...
src/backend/optimizer/path/prune.c
View file @
18fbe414
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.1
7 1998/09/01 04:29:44
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.1
8 1999/02/04 01:46:58
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -29,7 +29,7 @@ static List *prune_joinrel(RelOptInfo * rel, List *other_rels);
/*
* prune-joinrels--
* Removes any redundant relation entries from a list of rel nodes
* 'rel-list'. Obviosly, the first relation can't be a duplicate.
* 'rel-list'. Obvio
u
sly, the first relation can't be a duplicate.
*
* Returns the resulting list.
*
...
...
@@ -59,7 +59,7 @@ prune_joinrels(List *rel_list)
*
*/
static
List
*
prune_joinrel
(
RelOptInfo
*
rel
,
List
*
other_rels
)
prune_joinrel
(
RelOptInfo
*
rel
,
List
*
other_rels
)
{
List
*
i
=
NIL
;
List
*
result
=
NIL
;
...
...
@@ -135,8 +135,7 @@ prune_rel_path(RelOptInfo * rel, Path *unorderedpath)
Path
*
cheapest
=
set_cheapest
(
rel
,
rel
->
pathlist
);
/* don't prune if not pruneable -- JMH, 11/23/92 */
if
(
unorderedpath
!=
cheapest
&&
rel
->
pruneable
)
if
(
unorderedpath
!=
cheapest
&&
rel
->
pruneable
)
{
rel
->
unorderedpath
=
(
Path
*
)
NULL
;
...
...
src/backend/optimizer/util/pathnode.c
View file @
18fbe414
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.1
6 1999/02/03 21:16:52
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.1
7 1999/02/04 01:46:59
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -62,7 +62,7 @@ path_is_cheaper(Path *path1, Path *path2)
*
*/
Path
*
set_cheapest
(
RelOptInfo
*
parent_rel
,
List
*
pathlist
)
set_cheapest
(
RelOptInfo
*
parent_rel
,
List
*
pathlist
)
{
List
*
p
;
Path
*
cheapest_so_far
;
...
...
@@ -99,7 +99,7 @@ set_cheapest(RelOptInfo * parent_rel, List *pathlist)
*
*/
List
*
add_pathlist
(
RelOptInfo
*
parent_rel
,
List
*
unique_paths
,
List
*
new_paths
)
add_pathlist
(
RelOptInfo
*
parent_rel
,
List
*
unique_paths
,
List
*
new_paths
)
{
List
*
x
;
Path
*
new_path
;
...
...
src/include/nodes/nodes.h
View file @
18fbe414
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nodes.h,v 1.3
6 1999/02/03 20:15:46
momjian Exp $
* $Id: nodes.h,v 1.3
7 1999/02/04 01:47:00
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -81,7 +81,7 @@ typedef enum NodeTag
T_MergeOrder
,
T_RestrictInfo
,
T_JoinMethod
,
T_HInfo
,
T_H
ash
Info
,
T_MInfo
,
T_JoinInfo
,
T_Iter
,
...
...
src/include/nodes/relation.h
View file @
18fbe414
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: relation.h,v 1.1
2 1999/02/03 20:15:46
momjian Exp $
* $Id: relation.h,v 1.1
3 1999/02/04 01:47:02
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -87,7 +87,7 @@ typedef struct RelOptInfo
/* materialization information */
List
*
targetlist
;
List
*
pathlist
;
List
*
pathlist
;
/* Path structures */
struct
Path
*
unorderedpath
;
struct
Path
*
cheapestpath
;
bool
pruneable
;
...
...
@@ -102,11 +102,11 @@ typedef struct RelOptInfo
/* used by various scans and joins: */
Oid
*
ordering
;
/* OID of operators in sort order */
List
*
restrictinfo
;
/* restriction claus
es */
List
*
joininfo
;
/*
join claus
es */
List
*
restrictinfo
;
/* RestrictInfo structur
es */
List
*
joininfo
;
/*
JoinInfo structur
es */
List
*
innerjoin
;
List
*
superrels
;
}
RelOptInfo
;
}
RelOptInfo
;
extern
Var
*
get_expr
(
TargetEntry
*
foo
);
...
...
@@ -132,7 +132,7 @@ typedef struct PathOrder
{
Oid
*
sortop
;
MergeOrder
*
merge
;
}
ord
;
}
ord
;
}
PathOrder
;
typedef
struct
Path
...
...
@@ -230,11 +230,11 @@ typedef struct JoinMethod
List
*
clauses
;
}
JoinMethod
;
typedef
struct
HInfo
typedef
struct
H
ash
Info
{
JoinMethod
jmethod
;
Oid
hashop
;
}
HInfo
;
}
H
ash
Info
;
typedef
struct
MInfo
{
...
...
@@ -250,7 +250,7 @@ typedef struct JoinInfo
bool
mergejoinable
;
bool
hashjoinable
;
bool
inactive
;
}
JoinInfo
;
}
JoinInfo
;
typedef
struct
Iter
{
...
...
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