I think the ARR_HASNULL(arr) condition is not reflected in the error message.
I don't see CASCADE in the if condition that follows the above comment.
The code would be FKCONSTR_REF_EACH_ELEMENT and FKCONSTR_REF_PLAIN. I think you can mention them in the comment.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных