Disable master_create_empty_shard udf for single shard tables (#6902)

pull/6867/head
Ahmet Gedemenli 2023-05-03 16:04:56 +03:00 committed by Onur Tirtir
parent db2514ef78
commit 4321286005
1 changed files with 7 additions and 0 deletions

View File

@ -138,6 +138,13 @@ master_create_empty_shard(PG_FUNCTION_ARGS)
errdetail("We currently don't support creating shards "
"on hash-partitioned tables")));
}
else if (IsCitusTableType(relationId, SINGLE_SHARD_DISTRIBUTED))
{
ereport(ERROR, (errmsg("relation \"%s\" is a single shard table",
relationName),
errdetail("We currently don't support creating shards "
"on single shard tables")));
}
else if (IsCitusTableType(relationId, REFERENCE_TABLE))
{
ereport(ERROR, (errmsg("relation \"%s\" is a reference table",