mirror of https://github.com/citusdata/citus.git
Update tables type check
parent
9e938ba1a3
commit
5c74514600
|
@ -958,11 +958,16 @@ CreateTypeDDLCommandsIdempotent(const ObjectAddress *typeAddress)
|
||||||
return NIL;
|
return NIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char type = get_typtype(typeAddress->objectId);
|
HeapTuple tup = SearchSysCacheCopy1(TYPEOID, ObjectIdGetDatum(typeAddress->objectId));
|
||||||
char relKind = get_rel_relkind(typeAddress->objectId);
|
if (!HeapTupleIsValid(tup))
|
||||||
|
{
|
||||||
|
elog(ERROR, "cache lookup failed for type %u", typeAddress->objectId);
|
||||||
|
}
|
||||||
|
|
||||||
/* Don't send anything if the type is a table's row type */
|
/* Don't send any command if the type is a table's row type */
|
||||||
if (type == TYPTYPE_COMPOSITE && relKind != RELKIND_COMPOSITE_TYPE)
|
Form_pg_type typTup = (Form_pg_type) GETSTRUCT(tup);
|
||||||
|
if (typTup->typtype == TYPTYPE_COMPOSITE &&
|
||||||
|
get_rel_relkind(typTup->typrelid) != RELKIND_COMPOSITE_TYPE)
|
||||||
{
|
{
|
||||||
return NIL;
|
return NIL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue