hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject [1/2] incubator-hawq git commit: HAWQ-273. Move the confusing comments to the proper position.
Date Fri, 25 Dec 2015 05:39:08 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 10e2b18d2 -> d926fbf42


HAWQ-273. Move the confusing comments to the proper position.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/d926fbf4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/d926fbf4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/d926fbf4

Branch: refs/heads/master
Commit: d926fbf42a138051519c03d24aacfda69ec6e017
Parents: dd7a3bf
Author: Ming LI <mli@pivotal.io>
Authored: Thu Dec 24 15:40:14 2015 +0800
Committer: Ming LI <mli@pivotal.io>
Committed: Fri Dec 25 13:37:13 2015 +0800

----------------------------------------------------------------------
 src/backend/tcop/postgres.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d926fbf4/src/backend/tcop/postgres.c
----------------------------------------------------------------------
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index d0c8e70..ead516b 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -850,14 +850,6 @@ pg_plan_query(Query *querytree, ParamListInfo boundParams, QueryResourceLife
res
 /*
  * Generate plans for a list of already-rewritten queries.
  *
- * If needSnapshot is TRUE, we haven't yet set a snapshot for the current
- * query.  A snapshot must be set before invoking the planner, since it
- * might try to evaluate user-defined functions.  But we must not set a
- * snapshot if the list contains only utility statements, because some
- * utility statements depend on not having frozen the snapshot yet.
- * (We assume that such statements cannot appear together with plannable
- * statements in the rewriter's output.)
- *
  * Normal optimizable statements generate PlannedStmt entries in the result
  * list.  Utility statements are simply represented by their statement nodes.
  */
@@ -873,6 +865,15 @@ pg_plan_queries(List *querytrees, ParamListInfo boundParams,
 		Query	   *query = (Query *) lfirst(query_list);
 		Node *stmt;
 
+		/*
+		 * If needSnapshot is TRUE, we haven't yet set a snapshot for the current
+		 * query.  A snapshot must be set before invoking the planner, since it
+		 * might try to evaluate user-defined functions.  But we must not set a
+		 * snapshot if the list contains only utility statements, because some
+		 * utility statements depend on not having frozen the snapshot yet.
+		 * (We assume that such statements cannot appear together with plannable
+		 * statements in the rewriter's output.)
+		 */
 		if (query->commandType == CMD_UTILITY)
 		{
 			/* Utility commands have no plans. */


Mime
View raw message