Re: allow trigger to get updated columns
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-03-09T08:39:31Z
Lists: pgsql-hackers
On 2020-03-05 13:53, Daniel Gustafsson wrote: > The 0001 refactoring patch seems a clear win to me. > > In the 0002 patch: > > + For <literal>UPDATE</literal> triggers, a bitmap set indicating the > + columns that were updated by the triggering command. Generic trigger > > Is it worth pointing out that tg_updatedcols will be NULL rather than an empty > Bitmapset for non-UPDATE triggers? bitmapset.c treats NULL as an empty bitmap > but since a Bitmapset can be allocated but empty, maybe it's worth being > explicit to help developers? done > There isn't really a test suite that excercises this IIUC, how about adding > something like the attached diff to contrib/lo? It seemed like a lower impact > change than widening test_tsvector. done > +1 on the patchset, marking this entry as Ready For Committer. and done -- 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