aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
authorVadim B. Mikheev <vadim4o@yahoo.com>1998-11-22 10:48:45 +0000
committerVadim B. Mikheev <vadim4o@yahoo.com>1998-11-22 10:48:45 +0000
commit34680930d53da6d394cb14b38a946c46d32bf941 (patch)
treea084ddc6d3c1c30c04e3b41539396053078007e2 /src/backend/commands/explain.c
parent1f00f0dc2e49e5fcd820e3a734ccb53dfa83f3bb (diff)
downloadpostgresql-34680930d53da6d394cb14b38a946c46d32bf941.tar.gz
postgresql-34680930d53da6d394cb14b38a946c46d32bf941.zip
Fix using indices in OR.
EXPLAIN all indices used.
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r--src/backend/commands/explain.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index f7bb3e5ec44..2f08297d069 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.26 1998/11/08 19:38:34 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.27 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)
{