Fix oversights in pg_event_trigger_dropped_objects() fixes.

Commit a0b99fc12 caused pg_event_trigger_dropped_objects()
to not fill the object_name field for schemas, which it
should have; and caused it to fill the object_name field
for default values, which it should not have.

In addition, triggers and RLS policies really should behave
the same way as we're making column defaults do; that is,
they should have is_temporary = true if they belong to a
temporary table.

Fix those things, and upgrade event_trigger.sql's woefully
inadequate test coverage of these secondary output columns.

As before, back-patch only to v15.

Reported-by: Sergey Shinderuk <[email protected]>
Author: Tom Lane <[email protected]>
Discussion: 
https://postgr.es/m/[email protected]
Backpatch-through: 15

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ef81db9697a082300b452c8dd6824d2d07f5f557

Modified Files
--------------
src/backend/commands/event_trigger.c        |  87 ++++++++++++-
src/test/regress/expected/event_trigger.out | 188 +++++++++++++++++-----------
src/test/regress/sql/event_trigger.sql      |  55 ++++++--
3 files changed, 244 insertions(+), 86 deletions(-)

Reply via email to