Re: Adding OLD/NEW support to RETURNING
Dean Rasheed <dean.a.rasheed@gmail.com>
From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Tomas Vondra <tomas@vondra.me>
Date: 2024-08-26T11:24:03Z
Lists: 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
Commits
-
doc: Updates for RETURNING OLD/NEW.
- 3ba9639e39ed 18.0 landed
-
Fix parsing of qualified relation names in RETURNING.
- 43830ecb8a9b 18.0 landed
-
Add OLD/NEW support to RETURNING in DML queries.
- 80feb727c869 18.0 landed
-
Remove useless casts to (void *)
- 7f798aca1d5d 18.0 cited
-
Refactor/reword some error messages to avoid duplicates
- 2bb969f39984 18.0 cited