git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: dbab0c0) | patch
Improve handling of dropped objects in pg_event_trigger_ddl_commands()
2021年6月14日 05:57:22 +0000 (14:57 +0900)
2021年6月14日 05:57:22 +0000 (14:57 +0900)
commit 2d689babe3cb50dcb29f6ed595a61d56e518c0d8
Improve handling of dropped objects in pg_event_trigger_ddl_commands()

An object found as dropped when digging into the list of objects
returned by pg_event_trigger_ddl_commands() could cause a cache lookup
error, as the calls grabbing for the object address and the type name
would fail if the object was missing.

Those lookup errors could be seen with combinations of ALTER TABLE
sub-commands involving identity columns. The lookup logic is changed in
this code path to get a behavior similar to any other SQL-callable
function by ignoring objects that are not found, taking advantage of
2a10fdc. The back-branches are not changed, as they require this commit
that is too invasive for stable branches.

While on it, add test cases to exercise event triggers with identity
columns, and stress more cases with the event ddl_command_end for
relations.

Author: Sven Klemm, Aleksander Alekseev, Michael Paquier
Discussion: https://postgr.es/m/CAMCrgp2R1cEXU53iYKtW6yVEp2_yKUz+z=3-CTrYpPP+xryRtg@mail.gmail.com
src/backend/commands/event_trigger.c diff | blob | blame | history
src/test/regress/expected/event_trigger.out diff | blob | blame | history
src/test/regress/sql/event_trigger.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /