Handle element label and label property objects in object address functions
getObjectTypeDescription() and getObjectIdentityParts() do not handle objects in pg_propgraph_element_label and pg_propgraph_label_property catalogs. These functions when called for handling DDL that affects these objects cause an "unsupported object class" error. An error is reported when these functions are called via pg_identify_object() and pg_identify_object_as_address() with objects from the said catalogs. The objects in these catalogs do not have a (user-given) name but they can be manipulated individually through ALTER PROPERTY GRAPH sub-commands. Hence they need to be accessible to the event triggers. Handle these catalogs in the respective functions. Reported-by: Bertrand Drouvot <[email protected]> Author: Bertrand Drouvot <[email protected]> Author: Ashutosh Bapat <[email protected]> Reviewed-by: Michael Paquier <[email protected]> Reviewed-by: Ashutosh Bapat <[email protected]> Discussion: https://www.postgresql.org/message-id/aej1DkLwhyZWmtxJ@bdtpg Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/72498a86989e3491228ba09be43eab778a3ac943 Modified Files -------------- src/backend/catalog/objectaddress.c | 89 ++++++++++ .../regress/expected/create_property_graph.out | 189 ++++++++++++--------- src/test/regress/expected/event_trigger.out | 22 +++ src/test/regress/expected/object_address.out | 9 +- src/test/regress/sql/create_property_graph.sql | 31 ++-- src/test/regress/sql/event_trigger.sql | 15 ++ src/test/regress/sql/object_address.sql | 5 +- 7 files changed, 267 insertions(+), 93 deletions(-)
