Re: Mention TABLEFUNC to make comment consistent with code - Mailing list pgsql-hackers

From jian he
Subject Re: Mention TABLEFUNC to make comment consistent with code
Date
Msg-id CACJufxFQhTfY+RmhTUiZ3jr4usRuD49KxKX2Mqw8cxVTXo630w@mail.gmail.com
Whole thread Raw
In response to Mention TABLEFUNC to make comment consistent with code  (Steve Lau <stevelauc@outlook.com>)
List pgsql-hackers
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
expressionto preprocess_expression() is of specific types, we now mention TABLEFUNC in the comment so that comment and
codestay 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



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Skipping schema changes in publication
Next
From: Amit Kapila
Date:
Subject: Re: Orphaned records in pg_replication_origin_status after subscription drop