diff options
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r-- | src/backend/commands/typecmds.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 30850b2b22e..353043d581a 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -921,8 +921,14 @@ DefineDomain(CreateDomainStmt *stmt) /* * Check constraints are handled after domain creation, as - * they require the Oid of the domain + * they require the Oid of the domain; at this point we can + * only check that they're not marked NO INHERIT, because + * that would be bogus. */ + if (constr->is_no_inherit) + ereport(ERROR, + (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), + errmsg("CHECK constraints for domains cannot be marked NO INHERIT"))); break; /* |