diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/catalog/pg_publication.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c index 9330e2380af..15f68a915b6 100644 --- a/src/backend/catalog/pg_publication.c +++ b/src/backend/catalog/pg_publication.c @@ -50,6 +50,15 @@ static void check_publication_add_relation(Relation targetrel) { + /* Give more specific error for partitioned tables */ + if (RelationGetForm(targetrel)->relkind == RELKIND_PARTITIONED_TABLE) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("\"%s\" is a partitioned table", + RelationGetRelationName(targetrel)), + errdetail("Adding partitioned tables to publications is not supported."), + errhint("You can add the table partitions individually."))); + /* Must be table */ if (RelationGetForm(targetrel)->relkind != RELKIND_RELATION) ereport(ERROR, |