On Wed, 21 Aug 2024 at 10:07, jian he <jian.universal...@gmail.com> wrote:
>
> in Var comments:
>
>  * varlevelsup is greater than zero in Vars that represent outer references.
>  * Note that it affects the meaning of all of varno, varnullingrels, and
>  * varnosyn, all of which refer to the range table of that query level.
>
> Does this need to change accordingly?
>

No, I don't think so. varlevelsup doesn't directly change the meaning
of varreturningtype, any more than it changes the meaning of, say,
varattno. The point of that comment is that the fields varno,
varnullingrels, and varnosyn are (or contain) the range table indexes
of relations, which by themselves are insufficient to identify the
relations -- varlevelsup must be used in combination with those fields
to find the relations they refer to.

> i found there is no privilege test in 
> src/test/regress/sql/updatable_views.sql?
> Do we need to add some tests?
>

I don't think so, because varreturningtype doesn't affect any
permissions checks.

> Other than that, I didn't find any issue.

Thanks for reviewing.

If there are no other issues, I think this is probably ready for commit.

Regards,
Dean


Reply via email to