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
0705b02f
Commit
0705b02f
authored
Aug 31, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OR clause index fix
parent
cbf83190
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/indxpath.c
+3
-3
src/backend/optimizer/path/orindxpath.c
src/backend/optimizer/path/orindxpath.c
+7
-8
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/clauses.c
+3
-4
No files found.
src/backend/optimizer/path/indxpath.c
View file @
0705b02f
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.3
1 1998/08/19 02:02:11
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.3
2 1998/08/31 07:19:54
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -340,10 +340,10 @@ match_index_orclause(RelOptInfo *rel,
index
)
&&
IsA
(
get_rightop
((
Expr
*
)
clause
),
Const
))
||
(
match_index_to_operand
(
indexkey
,
(
Expr
*
)
get_
lef
top
((
Expr
*
)
clause
),
(
Expr
*
)
get_
righ
top
((
Expr
*
)
clause
),
rel
,
index
)
&&
IsA
(
get_
righ
top
((
Expr
*
)
clause
),
Const
))))
IsA
(
get_
lef
top
((
Expr
*
)
clause
),
Const
))))
{
lfirst
(
matching_indices
)
=
lcons
(
index
,
lfirst
(
matching_indices
));
}
...
...
src/backend/optimizer/path/orindxpath.c
View file @
0705b02f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.
8 1998/08/01 22:12:13
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.
9 1998/08/31 07:19:55
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -84,6 +84,7 @@ create_or_index_paths(Query *root,
break
;
}
}
/* do they all have indexes? */
if
(
index_flag
)
{
/* used to be a lisp every function */
IndexPath
*
pathnode
=
makeNode
(
IndexPath
);
...
...
@@ -216,6 +217,11 @@ best_or_subclause_index(Query *root,
List
*
ilist
;
bool
first_run
=
true
;
/* if we don't match anything, return zeros */
*
retIndexid
=
0
;
*
retCost
=
0
.
0
;
*
retSelec
=
0
.
0
;
foreach
(
ilist
,
indices
)
{
RelOptInfo
*
index
=
(
RelOptInfo
*
)
lfirst
(
ilist
);
...
...
@@ -268,12 +274,5 @@ best_or_subclause_index(Query *root,
}
}
/* we didn't get any indexes, so zero return values */
if
(
first_run
)
{
*
retIndexid
=
0
;
*
retCost
=
0
.
0
;
*
retSelec
=
0
.
0
;
}
return
;
}
src/backend/optimizer/util/clauses.c
View file @
0705b02f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.2
0 1998/08/10 02:26:29
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.2
1 1998/08/31 07:19:56
momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -198,8 +198,7 @@ make_funcclause(Func *func, List *funcargs)
bool
or_clause
(
Node
*
clause
)
{
return
(
clause
!=
NULL
&&
return
clause
!=
NULL
&&
nodeTag
(
clause
)
==
T_Expr
&&
((
Expr
*
)
clause
)
->
opType
==
OR_EXPR
);
}
...
...
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