From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix bogus CALLED_AS_TRIGGER() defenses. |
Date: | 2020-04-03 15:25:16 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix bogus CALLED_AS_TRIGGER() defenses.
contrib/lo's lo_manage() thought it could use
trigdata->tg_trigger->tgname in its error message about
not being called as a trigger. That naturally led to a core dump.
unique_key_recheck() figured it could Assert that fcinfo->context
is a TriggerData node in advance of having checked that it's
being called as a trigger. That's harmless in production builds,
and perhaps not that easy to reach in any case, but it's logically
wrong.
The first of these per bug #16340 from William Crowell;
the second from manual inspection of other CALLED_AS_TRIGGER
call sites.
Back-patch the lo.c change to all supported branches, the
other to v10 where the thinko crept in.
Discussion: https://postgr.es/m/[email protected]
Branch
------
REL9_6_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/a9f821f48893308fbb5533a1b722c233eaa2d603
Modified Files
--------------
contrib/lo/lo.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-04-03 15:34:23 | Re: pgsql: Include information on buffer usage during planning phase, in EX |
Previous Message | Fujii Masao | 2020-04-03 15:25:05 | Re: pgsql: Include information on buffer usage during planning phase, in EX |