From 34680930d53da6d394cb14b38a946c46d32bf941 Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Sun, 22 Nov 1998 10:48:45 +0000 Subject: Fix using indices in OR. EXPLAIN all indices used. --- src/backend/commands/explain.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/backend/commands/explain.c') 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) { -- cgit v1.2.3