On 12/2/23 19:11, Paul Jungwirth wrote:
> Thank you again for such thorough reviews!
>
> On Thu, Nov 16, 2023 at 11:12 PM jian he <jian.universality@gmail.com>
> wrote:
> > UPDATE FOR PORTION OF, may need insert privilege. We also need to
> document this.
> > Similarly, we also need to apply the above logic to DELETE FOR
> PORTION OF.
>
> I don't think UPDATE/DELETE FOR PORTION OF is supposed to require INSERT
> permission.
>
> Notionally the INSERTs are just to preserve what was there already, not
> to add new data.
> The idea is that a temporal table is equivalent to a table with one row
> for every "instant",
> i.e. one row per microsecond/second/day/whatever-time-resolution. Of
> course that would be too slow,
> so we use PERIODs/ranges instead, but the behavior should be the same.
> Date's book has a good discussion of this idea.
>
> I also checked the SQL:2011 draft standard, and there is a section
> called Access Rules in Part 2: SQL/Foundation for UPDATE and DELETE
> statements. Those sections say you need UPDATE/DELETE privileges, but
> say nothing about needing INSERT privileges. That is on page 949 and 972
> of the PDFs from the "SQL:20nn Working Draft Documents" link at [1]. If
> someone has a copy of SQL:2016 maybe something was changed, but I would
> be surprised
Nothing has changed here in SQL:2023 (or since).
--
Vik Fearing