Re: Adding OLD/NEW support to RETURNING - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Adding OLD/NEW support to RETURNING
Date
Msg-id CAEZATCVjgVABnRrcSr011N98XAF-o4WZZWnfUm2+X0sfCbNdyw@mail.gmail.com
Whole thread Raw
In response to Re: Adding OLD/NEW support to RETURNING  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
On Wed, 21 Aug 2024 at 10:07, jian he <jian.universality@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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation
Next
From: Jim Jones
Date:
Subject: Re: [PATCH] Add CANONICAL option to xmlserialize