diff options
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index d271a50fc7f..6048334c755 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -1994,6 +1994,14 @@ MergeAttributes(List *schema, List *supers, char relpersistence, relation = heap_openrv(parent, AccessExclusiveLock); /* + * Check for active uses of the parent partitioned table in the + * current transaction, such as being used in some manner by an + * enclosing command. + */ + if (is_partition) + CheckTableNotInUse(relation, "CREATE TABLE .. PARTITION OF"); + + /* * We do not allow partitioned tables and partitions to participate in * regular inheritance. */ |