postgresql/contrib/lo
Tom Lane 6dd9f35779 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/16340-591c7449dc7c8c47@postgresql.org
2020-04-03 11:24:56 -04:00
..
expected Add tg_updatedcols to TriggerData 2020-03-09 09:34:55 +01:00
sql Add tg_updatedcols to TriggerData 2020-03-09 09:34:55 +01:00
.gitignore lo: Add test suite 2017-09-14 22:22:59 -04:00
Makefile Remove support for upgrading extensions from "unpackaged" state. 2020-02-19 16:59:14 -05:00
lo--1.0--1.1.sql Update lo extension for parallel query. 2016-06-07 11:26:42 -04:00
lo--1.1.sql Update lo extension for parallel query. 2016-06-07 11:26:42 -04:00
lo.c Fix bogus CALLED_AS_TRIGGER() defenses. 2020-04-03 11:24:56 -04:00
lo.control Mark some contrib modules as "trusted". 2020-02-13 15:02:35 -05:00
lo_test.sql Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00