Hi,

On Sat, 16 May 2026 at 11:38, jian he <[email protected]> wrote:

> On Fri, May 15, 2026 at 12:00 PM Ayush Tiwari
> <[email protected]> wrote:
> >
> > One question about the policy part: do we need to disallow SET
> > EXPRESSION for whole-row policy references at all?
> >
> > For ordinary column references, RememberAllDependentForRebuilding()
> > already sees PolicyRelationId, but it only errors for
> > AT_AlterColumnType, not AT_SetExpression.
>
> For AT_SetExpression:
> RememberAllDependentForRebuilding does not handle policy objects.
> We can safely ignore policy objects that contain whole-row variable
> references too.
>
> > Two small cleanup nits if the policy path stays:
> >
> > 1. `attnum` and `colName` are no longer referenced in
> >    RememberWholeRowDependentForRebuilding(), so they can be dropped
> >    from the signature.
> >
> In case we later need to cope with an ALTER TABLE command, such as
> ALTER TABLE DROP COLUMN
> and ALTER COLUMN SET DATA TYPE.
> The signature also aligns with RememberAllDependentForRebuilding.
>
>
Thanks, v5 addresses my concern about policies.  Ignoring whole-row
policy references for SET EXPRESSION makes sense to me, and the comment
explains the distinction clearly.

No further comments from me.

Regards,
Ayush

Reply via email to