On Fri, Sep 25, 2026 at 4:41 PM Bertrand Drouvot
<[email protected]> wrote:
>
>                                 numchecks++;
> +
> +                               if (numchecks >= PG_INT16_MAX)
> +                                       ereport(ERROR,
> +                                                       errmsg("too many 
> check constraints on relation \"%s\"",
> +                                                                  
> RelationGetQualifiedRelationName(rel)));
>
Hi.

In MergeWithExistingConstraint, we have
```
else if (pg_add_s16_overflow(con->coninhcount, 1,
&con->coninhcount))
ereport(ERROR,
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
errmsg("too many inheritance parents"));
```

here, we can also use pg_add_s16_overflow?



--
jian
https://www.enterprisedb.com/


Reply via email to