Thread

  1. Re: Mention TABLEFUNC to make comment consistent with code

    jian he <jian.universality@gmail.com> — 2025-12-22T06:08:00Z

    On Thu, Nov 27, 2025 at 10:44 PM Steve Lau <stevelauc@outlook.com> wrote:
    >
    > Hi hackers! This patch updates the comment flatten_join_alias_vars() that explains why it can be skipped when the expression to preprocess_expression() is of specific types, we now mention TABLEFUNC in the comment so that comment and code stay consistent.
    >
    >
    
    hi.
    
    look at the json_table (TABLEFUNC) code, your comments change seems good.
    
    in transformJsonTable, we have:
    ``
    is_lateral = jt->lateral || contain_vars_of_level((Node *) tf, 0);
    ``
    
    so overall, I am ok with the comments:
    """
    But we can skip this in non-lateral RTE functions, VALUES lists,
    TABLESAMPLE, and TABLEFUNC clauses, since they can't contain any Vars of the
    current query level.
    """
    
    --
    jian
    https://www.enterprisedb.com