Improve error hint for already-modified rows under FOR PORTION OF

Started by Paul A Jungwirth3 months ago1 messageshackers

Thread notes

1 note#feature#minor#enhancement
hackorum-bot#feature#minor#enhancement
hackorum-bot
2 days ago

@global #feature #minor #enhancement

#feature#minor#enhancement
Jump to latest
#1Paul A Jungwirth
pj@illuminatedcomputing.com

Hi Hackers,

Here is a fix for finding D7 from [0]/messages/by-id/CA+renyV6QLOJYmLo3gbsg1Y+Crho8NqME1jJXgPbO_NgxfBaKQ@mail.gmail.com.

If a BEFORE trigger changes a row and then the main statement changes
the same row, we raise an error with a hint suggesting to use AFTER
triggers instead. But temporal leftovers fire BEFORE & AFTER triggers
while the statement is proceeding, so that hint may not be applicable.
This commit adds an errdetail when the top-level statement used FOR
PORTION OF.

[0]: /messages/by-id/CA+renyV6QLOJYmLo3gbsg1Y+Crho8NqME1jJXgPbO_NgxfBaKQ@mail.gmail.com

Yours,

--
Paul ~{:-)
pj@illuminatedcomputing.com

Attachments:

t253681_1
v1-0001-Improve-the-error-hint-for-already-modified-rows-.patchtext/x-patch; charset=US-ASCII; name=v1-0001-Improve-the-error-hint-for-already-modified-rows-.patchDownload+180-1