aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-04-05 20:32:06 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-04-05 20:32:06 +0000
commiteb4c723e562c350f3af828ebe0e8847c79a02a69 (patch)
treee2d2ea0d39a63f93b9f6798ecdff58616fd9627a /src
parentfbcce08046bc553901ccbcf1ea6cf82f61968970 (diff)
downloadpostgresql-eb4c723e562c350f3af828ebe0e8847c79a02a69.tar.gz
postgresql-eb4c723e562c350f3af828ebe0e8847c79a02a69.zip
Make ExecInitExpr build the list of SubPlans found in a plan tree in order
of discovery, rather than reverse order. This doesn't matter functionally (I suppose the previous coding dates from the time when lcons was markedly cheaper than lappend). However now that EXPLAIN is labeling subplans with IDs that are based on order of creation, this may help produce a slightly less surprising printout.
Diffstat (limited to 'src')
-rw-r--r--src/backend/executor/execQual.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c
index 21a9eb1753c..b831aa530fa 100644
--- a/src/backend/executor/execQual.c
+++ b/src/backend/executor/execQual.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.244 2009/04/02 22:39:29 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.245 2009/04/05 20:32:06 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -4326,7 +4326,7 @@ ExecInitExpr(Expr *node, PlanState *parent)
sstate = ExecInitSubPlan(subplan, parent);
/* Add SubPlanState nodes to parent->subPlan */
- parent->subPlan = lcons(sstate, parent->subPlan);
+ parent->subPlan = lappend(parent->subPlan, sstate);
state = (ExprState *) sstate;
}