allow trigger to get updated columns

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: allow trigger to get updated columns
Date: 2020-02-24 09:58:03
Message-ID: 11c5f156-67a9-0fb5-8200-2a8018eb2e0c@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)2ndquadrant(dot)com

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Code-simplification.patch text/plain 9.5 KB
0002-Add-tg_updatedcols-to-TriggerData.patch text/plain 7.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-02-24 10:08:47 Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Previous Message Prabhat Sahu 2020-02-24 09:44:34 Re: [Proposal] Global temporary tables