On 23.11.23 14:13, Aleksander Alekseev wrote:
> =# create domain connotnull1 integer;
> =# create domain connotnull2 integer;
> =# alter domain connotnull1 add not null value;
> =# alter domain connotnull2 set not null;
> =# \dD
> ERROR: unexpected null value in cached tuple for catalog
> pg_constraint column conkey
Yeah, for domain not-null constraints pg_constraint.conkey is indeed
null. Should we put something in there?
Attached is an updated patch that avoids the error by taking a separate
code path for domain constraints in ruleutils.c. But maybe there is
another way to arrange this.