pgsql: Apply RI trigger skipping tests also for DELETE

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Apply RI trigger skipping tests also for DELETE
Date: 2018-11-10 15:21:21
Message-ID: E1gLV4b-00089E-Kz@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Apply RI trigger skipping tests also for DELETE

The tests added in cfa0f4255bb0f5550d37a01c4d8fe2966d20040c to skip
firing an RI trigger if any old key value is NULL can also be applied
for DELETE. This should give a performance gain in those cases, and it
also saves a lot of duplicate code in the actual RI triggers. (That
code was already dead code for the UPDATE cases.)

Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/69ee2ff9308bbfe0e0a89667555e901fec5e154b

Modified Files
--------------
src/backend/commands/trigger.c | 4 +-
src/backend/utils/adt/ri_triggers.c | 105 ++----------------------------------
2 files changed, 6 insertions(+), 103 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2018-11-10 22:35:27 Re: pgsql: Remove ineffective check against dropped columns from slot_getat
Previous Message David Rowley 2018-11-10 12:11:34 Re: pgsql: Remove ineffective check against dropped columns from slot_getat