Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r9jUH-001qih-Qu for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Dec 2023 10:14:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r9jUC-00CDu4-VF for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Dec 2023 10:14:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r9jUC-00CDtw-FZ for pgsql-hackers@lists.postgresql.org; Sun, 03 Dec 2023 10:14:04 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r9jU9-008ZQo-Iv for pgsql-hackers@lists.postgresql.org; Sun, 03 Dec 2023 10:14:03 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 9106C1C0004; Sun, 3 Dec 2023 10:13:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postgresfriends.org; s=gm1; t=1701598438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YJfAJaP/IlV1orOhpC2v94fQeHLGL/iVc0s4eO9oFgA=; b=o46kUf8o0VrB1Sid9Lqsa4Lf3h0bYp8ZJQtlMl8/csb0W4o59G7iEpHX+zemb/6U/gLUs3 qJ/uAQyj8GLEOpEKmevL7XQBNWt17FL3mHEpNd6+R2EmHYN9poTZojVMP5UoJEYC+fXFMD ZdvfWOwkWxAHzoruKYckyRyDrtZouBW3IT31vVkwWm4lsFmOdZspVhLiyvj/z6ajahR3v3 z4WKaVxas9T00LsbQkUihWID4/YpRIaexi8snOmE+DV4GV+ofv18Cs6CISDvxqEHge2dud fWQxqUnsnGTVFs5d+zGQcsjhwK6elB+0GI0MjmCpF6nn3gDF5AE4vf4eZmVORA== Message-ID: <1b972c50-1b0f-4753-8a33-b6d8cce8e598@postgresfriends.org> Date: Sun, 3 Dec 2023 11:13:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: SQL:2011 application time To: Paul Jungwirth , jian he Cc: Peter Eisentraut , PostgreSQL Hackers References: <5a16a59a-d497-7d72-07aa-0afc09d5193a@illuminatedcomputing.com> <2d9740ad-3bb7-473c-8441-344351caa8ee@illuminatedcomputing.com> Content-Language: en-US From: Vik Fearing In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: vik@postgresfriends.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 > 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