Re: Fix DROP PROPERTY GRAPH "unsupported object class" error

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, pgsql-hackers@lists.postgresql.org, Peter Eisentraut <peter@eisentraut.org>
Date: 2026-05-06T23:22:49Z
Lists: pgsql-hackers
On Thu, Apr 30, 2026 at 06:01:22PM +0530, Ashutosh Bapat wrote:
> I was planning to start a separate discussion to change all catalog
> lookups in those functions to use get_catalog_object_by_oid(), hence
> didn't include changes in getObjectDescription(). But I am fine if we
> want to do it in this patch just for the property graph related nodes.

It does not strike me as a big deal to use get_catalog_object_by_oid
for PropgraphLabelPropertyRelationId, not does it strike me as a big
deal to keep the code as is as this is new code.  Changing the other
object types to use get_catalog_object_by_oid() is going overboard as
it is not directly related to the issue at hand, so a separate
discussion looks adapted.  I do agree that it would be a good move to
reuse get_catalog_object_by_oid() when we can: a syscache scan (or if
one is added in the future) will be always cheaper than a systable
scan.
--
Michael