Hi Hackers,
Here is a fix for finding D11 from [0].
When FOR PORTION OF through a view violates WITH CHECK OPTION *both*
by the updated row and by the inserted temporal leftover, we show an
error complaining about the leftover. It would be clearer to show an
error about the top-level row. This commit moves the check a little
earlier (but still after constraints & uniqueness violations), when
FOR PORTION OF is used.
I think this patch would be simpler if we unconditionally shuffled the
order in ExecUpdateEpilogue to be (1) ExecWithCheckOptions, (2)
ExecForPortionOfLeftovers, (3) ExecARUpdateTriggers. I couldn't find
any problems there. But it felt too drastic so close to release. If
you'd like that patch instead, I'll send a revision.
[0] https://www.postgresql.org/message-id/CA%2BrenyV6QLOJYmLo3gbsg1Y%2BCrho8NqME1jJXgPbO_NgxfBaKQ%40mail.gmail.com
Yours,
--
Paul ~{:-)
pj@illuminatedcomputing.com