Re: SQL:2011 application time

From: Vik Fearing <vik(at)postgresfriends(dot)org>
To: Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: SQL:2011 application time
Date: 2023-12-03 10:13:57
Message-ID: 1b972c50-1b0f-4753-8a33-b6d8cce8e598@postgresfriends.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(dot)universality(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2023-12-03 12:55:56 RE: logical decoding and replication of sequences, take 2
Previous Message Thomas Munro 2023-12-03 06:00:15 Re: postgres_fdw test timeouts