提交 abc6441d 编写于 作者: T Tom Lane

Remove unnecessary use of index_open just to get the index name.

上级 bb6a7882
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994-5, Regents of the University of California * Portions Copyright (c) 1994-5, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.126 2004/09/13 20:06:28 tgl Exp $ * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.127 2004/09/30 17:42:42 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -502,13 +502,12 @@ explain_outNode(StringInfo str, ...@@ -502,13 +502,12 @@ explain_outNode(StringInfo str,
i = 0; i = 0;
foreach(l, ((IndexScan *) plan)->indxid) foreach(l, ((IndexScan *) plan)->indxid)
{ {
Relation relation; char *indname;
relation = index_open(lfirst_oid(l)); indname = get_rel_name(lfirst_oid(l));
appendStringInfo(str, "%s%s", appendStringInfo(str, "%s%s",
(++i > 1) ? ", " : "", (++i > 1) ? ", " : "",
quote_identifier(RelationGetRelationName(relation))); quote_identifier(indname));
index_close(relation);
} }
/* FALL THRU */ /* FALL THRU */
case T_SeqScan: case T_SeqScan:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册