pgsql: Allow ON UPDATE/DELETE SET DEFAULT plans to be cached.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow ON UPDATE/DELETE SET DEFAULT plans to be cached.
Date: 2012-06-18 23:37:34
Message-ID: E1SglVm-0006KZ-4G@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow ON UPDATE/DELETE SET DEFAULT plans to be cached.

Once upon a time, somebody was worried that cached RI plans wouldn't get
remade with new default values after ALTER TABLE ... SET DEFAULT, so they
didn't allow caching of plans for ON UPDATE/DELETE SET DEFAULT actions.
That time is long gone, though (and even at the time I doubt this was the
greatest hazard posed by ALTER TABLE...). So allow these triggers to cache
their plans just like the others.

The cache_plan argument to ri_PlanCheck is now vestigial, since there
are no callers that don't pass "true"; but I left it alone in case there
is any future need for it.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e8c9fd5fdf768323911f7088e8287f63b513c3c6

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c | 24 +++++++++---------
src/test/regress/expected/foreign_key.out | 36 +++++++++++++++++++++++++++++
src/test/regress/sql/foreign_key.sql | 17 +++++++++++++
3 files changed, 65 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2012-06-19 02:46:03 pgsql: Improve comments about why SET DEFAULT triggers must recheck for
Previous Message Tom Lane 2012-06-18 22:51:03 pgsql: Remove derived fields from RI_QueryKey, and do a bit of other cl