On Fri, Sep 25, 2026 at 4:41 PM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> 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/