diff options
| author | Mason Sharp | 2010-11-04 19:39:28 +0000 |
|---|---|---|
| committer | Pavan Deolasee | 2011-05-19 16:45:21 +0000 |
| commit | b3e9b52374e10fc7cad69826bc4edded509381ef (patch) | |
| tree | 4569aa1f6991159cb574561e10df449d1d030623 | |
| parent | feeca12a27a8233428daf5187728dd6771ef194d (diff) | |
Fix bug with primary key in CREATE TABLE statement.
By Benny Mei Le
| -rw-r--r-- | src/backend/parser/parse_utilcmd.c | 2 | ||||
| -rw-r--r-- | src/backend/tcop/utility.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 0e0f186d7e..30149a8542 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -1293,7 +1293,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) } /* Existing table, check if it is safe */ - if (!cxt->distributeby && !isLocalSafe) + if (cxt->isalter && !cxt->distributeby && !isLocalSafe) isLocalSafe = CheckLocalIndexColumn ( cxt->rel->rd_locator_info->locatorType, cxt->rel->rd_locator_info->partAttrName, key); } diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index e70fe3e72b..68a483e357 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -941,7 +941,7 @@ ProcessUtility(Node *parsetree, false, /* quiet */ stmt->concurrent); /* concurrent */ #ifdef PGXC - if (IS_PGXC_COORDINATOR) + if (IS_PGXC_COORDINATOR && !stmt->isconstraint) ExecUtilityStmtOnNodes(queryString, NULL, stmt->concurrent, EXEC_ON_ALL_NODES); #endif |
