On Mon, Nov 22, 2021 at 10:21 PM Zhihong Yu <zyu@yugabyte.com> wrote:
>
> Hi,
> + If a foreign key with a <literal>SET NULL</literal> or <literal>SET
> + DEFAULT</literal> delete action, which columns should be updated.
>
> which columns should be updated -> the columns that should be updated
Done.
> + if (fk_del_set_cols)
> + {
> + int num_delete_cols = 0;
>
> Since num_delete_cols is only used in the else block, I think it can be moved inside else block.
> Or you can store the value inside *num_fk_del_set_cols directly and avoid num_delete_cols.
I've moved it inside the else block (and removed the initialization).
Updated patch attached. Thanks for taking a look so quickly!
- Paul