Skip to content

Commit abc6441

Browse files
committed
Remove unnecessary use of index_open just to get the index name.
1 parent bb6a788 commit abc6441

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/backend/commands/explain.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994-5, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.126 2004/09/13 20:06:28 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.127 2004/09/30 17:42:42 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -502,13 +502,12 @@ explain_outNode(StringInfo str,
502502
i = 0;
503503
foreach(l, ((IndexScan *) plan)->indxid)
504504
{
505-
Relation relation;
505+
char *indname;
506506

507-
relation = index_open(lfirst_oid(l));
507+
indname = get_rel_name(lfirst_oid(l));
508508
appendStringInfo(str, "%s%s",
509509
(++i > 1) ? ", " : "",
510-
quote_identifier(RelationGetRelationName(relation)));
511-
index_close(relation);
510+
quote_identifier(indname));
512511
}
513512
/* FALL THRU */
514513
case T_SeqScan:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy