Handle element label and label property objects in object address functions

Peter Eisentraut <peter@eisentraut.org>

Commit: 72498a86989e3491228ba09be43eab778a3ac943
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2026-06-05T07:02:54Z
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 <bertranddrouvot.pg@gmail.com>
Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://www.postgresql.org/message-id/aej1DkLwhyZWmtxJ@bdtpg

Files

Discussion