postgresql/src
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
..
backend Fix bogus CALLED_AS_TRIGGER() defenses. 2020-04-03 11:24:56 -04:00
bin Add support for \aset in pgbench 2020-04-03 11:45:15 +09:00
common Add SQL functions for Unicode normalization 2020-04-02 08:56:27 +02:00
fe_utils Fix bug in pg_basebackup -F plain -R. 2020-02-12 09:08:22 +09:00
include Revert "Include information on buffer usage during planning phase, in EXPLAIN output." 2020-04-03 12:20:42 +09:00
interfaces Allow ecpg to be built stand-alone, allow parallel libpq make 2020-03-31 14:17:32 -04:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Improve user control over truncation of logged bind-parameter values. 2020-04-02 15:04:51 -04:00
port Be more careful about extracting encoding from locale strings on Windows. 2020-03-30 11:14:58 -04:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Revert "Include information on buffer usage during planning phase, in EXPLAIN output." 2020-04-03 12:20:42 +09:00
timezone Require stdint.h 2020-02-21 09:20:32 +01:00
tools Allow pg_stat_statements to track planning statistics. 2020-04-02 11:20:19 +09:00
tutorial Update copyrights for 2020 2020-01-01 12:21:45 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00