diff options
author | Pavan Deolasee | 2017-06-15 12:24:10 +0000 |
---|---|---|
committer | Pavan Deolasee | 2017-06-15 12:24:10 +0000 |
commit | dc11a82c58da80f76feeaaf6cc31b196ba4ace4f (patch) | |
tree | bffa940803af14c1743a37f52cea6e2cde24dd90 | |
parent | 0ffa504a17f58f2bc045b0039f40e4917ee50d20 (diff) |
Ensure transformCreateStmt allows partitioned table alongside regular table
While dealing with XL distribution, we check if the table is a regular table or
not. Since partitioned tables must get the same treatment as regular table as
far as distribution goes, we check and allow partitioned tables too.
-rw-r--r-- | src/backend/parser/parse_utilcmd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 708188f300..5e1e89c979 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -427,7 +427,8 @@ transformCreateStmt(CreateStmt *stmt, const char *queryString) Assert(IsA(inh, RangeVar)); rel = heap_openrv(inh, AccessShareLock); - if (rel->rd_rel->relkind != RELKIND_RELATION) + if ((rel->rd_rel->relkind != RELKIND_RELATION) && + (rel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("inherited relation \"%s\" is not a table", |