aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
authorThomas G. Lockhart <lockhart@fourpalms.org>2000-02-15 03:38:29 +0000
committerThomas G. Lockhart <lockhart@fourpalms.org>2000-02-15 03:38:29 +0000
commita344a6e7b5d7b2b87f33a155c3ef88bdfdce3fd8 (patch)
tree78c19baad416cfe014237bc726baff63aff2b150 /src/backend/commands/explain.c
parent92c8437d8de8efeb5324fcccb0175beec8e66619 (diff)
downloadpostgresql-a344a6e7b5d7b2b87f33a155c3ef88bdfdce3fd8.tar.gz
postgresql-a344a6e7b5d7b2b87f33a155c3ef88bdfdce3fd8.zip
Carry column aliases from the parser frontend. Enables queries like
SELECT a FROM t1 tx (a); Allow join syntax, including queries like SELECT * FROM t1 NATURAL JOIN t2; Update RTE structure to hold column aliases in an Attr structure.
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r--src/backend/commands/explain.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 8406416b765..2b152b2fe5b 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994-5, Regents of the University of California
*
- * $Id: explain.c,v 1.52 2000/01/26 05:56:13 momjian Exp $
+ * $Id: explain.c,v 1.53 2000/02/15 03:36:39 thomas Exp $
*
*/
@@ -230,12 +230,12 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
RangeTblEntry *rte = nth(((Scan *) plan)->scanrelid - 1, es->rtable);
appendStringInfo(str, " on ");
- if (strcmp(rte->refname, rte->relname) != 0)
+ if (strcmp(rte->ref->relname, rte->relname) != 0)
{
appendStringInfo(str, "%s ",
stringStringInfo(rte->relname));
}
- appendStringInfo(str, stringStringInfo(rte->refname));
+ appendStringInfo(str, stringStringInfo(rte->ref->relname));
}
break;
case T_TidScan:
@@ -244,12 +244,12 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
RangeTblEntry *rte = nth(((TidScan *) plan)->scan.scanrelid - 1, es->rtable);
appendStringInfo(str, " on ");
- if (strcmp(rte->refname, rte->relname) != 0)
+ if (strcmp(rte->ref->relname, rte->relname) != 0)
{
appendStringInfo(str, "%s ",
stringStringInfo(rte->relname));
}
- appendStringInfo(str, stringStringInfo(rte->refname));
+ appendStringInfo(str, stringStringInfo(rte->ref->relname));
}
break;
default: