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
34680930
Commit
34680930
authored
Nov 22, 1998
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix using indices in OR.
EXPLAIN all indices used.
parent
1f00f0dc
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
12 deletions
+27
-12
src/backend/commands/explain.c
src/backend/commands/explain.c
+9
-4
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeIndexscan.c
+2
-2
src/backend/nodes/copyfuncs.c
src/backend/nodes/copyfuncs.c
+2
-1
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+4
-1
src/backend/nodes/readfuncs.c
src/backend/nodes/readfuncs.c
+4
-1
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/createplan.c
+5
-2
src/backend/parser/gram.c
src/backend/parser/gram.c
+1
-1
No files found.
src/backend/commands/explain.c
View file @
34680930
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.2
6 1998/11/08 19:38:34 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.2
7 1998/11/22 10:48:34 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -217,9 +217,14 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
{
case
T_IndexScan
:
appendStringInfo
(
str
,
" using "
);
l
=
((
IndexScan
*
)
plan
)
->
indxid
;
relation
=
RelationIdCacheGetRelation
((
int
)
lfirst
(
l
));
appendStringInfo
(
str
,
(
RelationGetRelationName
(
relation
))
->
data
);
i
=
0
;
foreach
(
l
,
((
IndexScan
*
)
plan
)
->
indxid
)
{
relation
=
RelationIdCacheGetRelation
((
int
)
lfirst
(
l
));
if
(
++
i
>
1
)
appendStringInfo
(
str
,
", "
);
appendStringInfo
(
str
,
(
RelationGetRelationName
(
relation
))
->
data
);
}
case
T_SeqScan
:
if
(((
Scan
*
)
plan
)
->
scanrelid
>
0
)
{
...
...
src/backend/executor/nodeIndexscan.c
View file @
34680930
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.2
7 1998/09/01 04:28:32 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.2
8 1998/11/22 10:48:36 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -154,7 +154,7 @@ IndexNext(IndexScan *node)
prev_index
++
)
{
scanstate
->
cstate
.
cs_ExprContext
->
ecxt_scantuple
=
slot
;
if
(
ExecQual
(
nth
(
prev_index
,
node
->
indxqual
),
if
(
ExecQual
(
nth
(
prev_index
,
node
->
indxqual
orig
),
scanstate
->
cstate
.
cs_ExprContext
))
{
prev_matches
=
true
;
...
...
src/backend/nodes/copyfuncs.c
View file @
34680930
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.
49 1998/10/22 13:52:20 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.
50 1998/11/22 10:48:38 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -247,6 +247,7 @@ _copyIndexScan(IndexScan *from)
*/
newnode
->
indxid
=
listCopy
(
from
->
indxid
);
Node_Copy
(
from
,
newnode
,
indxqual
);
Node_Copy
(
from
,
newnode
,
indxqualorig
);
Node_Copy
(
from
,
newnode
,
indxstate
);
return
newnode
;
...
...
src/backend/nodes/outfuncs.c
View file @
34680930
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.4
7 1998/10/22 13:52:21 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.4
8 1998/11/22 10:48:39 vadim
Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
...
...
@@ -517,6 +517,9 @@ _outIndexScan(StringInfo str, IndexScan *node)
appendStringInfo
(
str
,
" :indxqual "
);
_outNode
(
str
,
node
->
indxqual
);
appendStringInfo
(
str
,
" :indxqualorig "
);
_outNode
(
str
,
node
->
indxqualorig
);
}
/*
...
...
src/backend/nodes/readfuncs.c
View file @
34680930
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.3
8 1998/10/22 13:52:22 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.3
9 1998/11/22 10:48:40 vadim
Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
...
...
@@ -546,6 +546,9 @@ _readIndexScan()
token
=
lsptok
(
NULL
,
&
length
);
/* eat :indxqual */
local_node
->
indxqual
=
nodeRead
(
true
);
/* now read it */
token
=
lsptok
(
NULL
,
&
length
);
/* eat :indxqualorig */
local_node
->
indxqualorig
=
nodeRead
(
true
);
/* now read it */
return
local_node
;
}
...
...
src/backend/optimizer/plan/createplan.c
View file @
34680930
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.3
2 1998/09/01 04:29:47 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.3
3 1998/11/22 10:48:43 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -63,7 +63,7 @@ static Node *fix_indxqual_references(Node *clause, Path *index_path);
static
Temp
*
make_temp
(
List
*
tlist
,
List
*
keys
,
Oid
*
operators
,
Plan
*
plan_node
,
int
temptype
);
static
IndexScan
*
make_indexscan
(
List
*
qptlist
,
List
*
qpqual
,
Index
scanrelid
,
List
*
indxid
,
List
*
indxqual
,
Cost
cost
);
List
*
indxid
,
List
*
indxqual
,
List
*
indxqualorig
,
Cost
cost
);
static
NestLoop
*
make_nestloop
(
List
*
qptlist
,
List
*
qpqual
,
Plan
*
lefttree
,
Plan
*
righttree
);
static
HashJoin
*
make_hashjoin
(
List
*
tlist
,
List
*
qpqual
,
...
...
@@ -405,6 +405,7 @@ create_indexscan_node(IndexPath *best_path,
lfirsti
(
best_path
->
path
.
parent
->
relids
),
best_path
->
indexid
,
fixed_indxqual
,
indxqual
,
best_path
->
path
.
path_cost
);
return
scan_node
;
...
...
@@ -937,6 +938,7 @@ make_indexscan(List *qptlist,
Index
scanrelid
,
List
*
indxid
,
List
*
indxqual
,
List
*
indxqualorig
,
Cost
cost
)
{
IndexScan
*
node
=
makeNode
(
IndexScan
);
...
...
@@ -951,6 +953,7 @@ make_indexscan(List *qptlist,
node
->
scan
.
scanrelid
=
scanrelid
;
node
->
indxid
=
indxid
;
node
->
indxqual
=
indxqual
;
node
->
indxqualorig
=
indxqualorig
;
node
->
scan
.
scanstate
=
(
CommonScanState
*
)
NULL
;
return
node
;
...
...
src/backend/parser/gram.c
View file @
34680930
...
...
@@ -229,7 +229,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.4
8 1998/10/30 04:54:01 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.4
9 1998/11/22 10:48:45 vadim
Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
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