On Mon, Nov 8, 2021 at 5:53 PM houzj.f...@fujitsu.com <houzj.f...@fujitsu.com> wrote: > > 3) v37-0005 > > - no parse nodes of any kind other than Var, OpExpr, Const, BoolExpr, FuncExpr > > I think there could be other node type which can also be considered as simple > expression, for exmaple T_NullIfExpr.
The current walker restrictions are from a previously agreed decision by Amit/Tomas [1] and from an earlier suggestion from Andres [2] to keep everything very simple for a first version. Yes, you are right, there might be some additional node types that might be fine, but at this time I don't want to add anything different without getting their approval to do so. Anyway, additions like this are all candidates for a future version of this row-filter feature. > > Personally, I think it's natural to only check the IMMUTABLE and > whether-user-defined in the new function rowfilter_walker. We can keep the > other row-filter errors which were thrown for EXPR_KIND_PUBLICATION_WHERE in > the 0001 patch. > YMMV. IMO it is much more convenient for all the filter validations to be centralized just in one walker function instead of scattered all over the place like they were in the 0001 patch. ----- [1] https://www.postgresql.org/message-id/CAA4eK1%2BXoD49bz5-2TtiD0ugq4PHSRX2D1sLPR_X4LNtdMc4OQ%40mail.gmail.com [2] https://www.postgresql.org/message-id/20210128022032.eq2qqc6zxkqn5syt%40alap3.anarazel.de Kind Regards, Peter Smith. Fujitsu Australia