mirror of https://github.com/citusdata/citus.git
safely error out in DistributedTableCacheEntry function
parent
17d9b934c3
commit
cf718ffe77
|
@ -790,8 +790,17 @@ DistributedTableCacheEntry(Oid distributedRelationId)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *relationName = get_rel_name(distributedRelationId);
|
char *relationName = get_rel_name(distributedRelationId);
|
||||||
|
|
||||||
|
if (relationName == NULL)
|
||||||
|
{
|
||||||
|
ereport(ERROR, (errmsg("relation with OID %u does not exist",
|
||||||
|
distributedRelationId)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
ereport(ERROR, (errmsg("relation %s is not distributed", relationName)));
|
ereport(ERROR, (errmsg("relation %s is not distributed", relationName)));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue