diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/catalog/heap.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 71c99318343..86399571475 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -485,12 +485,19 @@ CheckAttributeType(const char *attname, errmsg("column \"%s\" has pseudo-type %s", attname, format_type_be(atttypid)))); } + else if (att_typtype == TYPTYPE_DOMAIN) + { + /* + * If it's a domain, recurse to check its base type. + */ + CheckAttributeType(attname, getBaseType(atttypid), attcollation, + containing_rowtypes, + allow_system_table_mods); + } else if (att_typtype == TYPTYPE_COMPOSITE) { /* - * For a composite type, recurse into its attributes. You might think - * this isn't necessary, but since we allow system catalogs to break - * the rule, we have to guard against the case. + * For a composite type, recurse into its attributes. */ Relation relation; TupleDesc tupdesc; |