summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael P2011-04-02 17:27:21 +0000
committerPavan Deolasee2011-05-24 10:15:41 +0000
commitdb52bff897a1ce4b2a99266a4aed9b141eca3974 (patch)
tree9bd2b07fdf51614d38c1a39151a3b85b4b4eda8e
parentf8fb49d57f04fd0e1930847340c1c0f7897d2438 (diff)
Support for COMMENT
Depending on the object type, COMMENT is treated on Coordinators or on all nodes.
-rw-r--r--src/backend/tcop/utility.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 9e35de4009..08a05a955e 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -801,6 +801,24 @@ standard_ProcessUtility(Node *parsetree,
case T_CommentStmt:
CommentObject((CommentStmt *) parsetree);
+
+#ifdef PGXC
+ /*
+ * We need to check details of the object being dropped and
+ * run command on correct nodes
+ */
+ if (IS_PGXC_COORDINATOR && !IsConnFromCoord())
+ {
+ CommentStmt *stmt = (CommentStmt *) parsetree;
+
+ /* Sequence and views exists only on Coordinators */
+ if (stmt->objtype == OBJECT_SEQUENCE ||
+ stmt->objtype == OBJECT_VIEW)
+ ExecUtilityStmtOnNodes(queryString, NULL, false, EXEC_ON_COORDS);
+ else
+ ExecUtilityStmtOnNodes(queryString, NULL, false, EXEC_ON_ALL_NODES);
+ }
+#endif
break;
case T_CopyStmt: