allow trigger to get updated columns
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-02-24T09:58:03Z
Lists: pgsql-hackers
Attachments
- 0001-Code-simplification.patch (text/plain) patch 0001
- 0002-Add-tg_updatedcols-to-TriggerData.patch (text/plain) patch 0002
This is a change to make the bitmap of updated columns available to a trigger in TriggerData. This is the same idea as was recently done to generated columns [0]: Generic triggers such as tsvector_update_trigger can use this information to skip work if the columns they are interested in haven't changed. With the generated columns change, perhaps this isn't so interesting anymore, but I suspect a lot of existing installations still use tsvector_update_trigger. In any case, since I had already written the code, I figured I post it here. Perhaps there are other use cases. [0]: https://www.postgresql.org/message-id/flat/b05e781a-fa16-6b52-6738-761181204567@2ndquadrant.com -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Repair incorrect handling of AfterTriggerSharedData.ats_modifiedcols.
- ea68ea6320ff 18.0 landed
- cdeed4de7729 15.11 landed
- 8c57f548534b 16.7 landed
- 30859930528b 14.16 landed
- 2b72fed2dd74 17.3 landed
- 001c09d8b72e 13.19 landed
-
Add tg_updatedcols to TriggerData
- 71d60e2aa051 13.0 landed
-
Code simplification
- 8f152b6c50c7 13.0 landed