Fix DROP PROPERTY GRAPH "unsupported object class" error - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Fix DROP PROPERTY GRAPH "unsupported object class" error
Date
Msg-id aej1DkLwhyZWmtxJ@bdtpg
Whole thread
Responses Re: Fix DROP PROPERTY GRAPH "unsupported object class" error
List pgsql-hackers
Hi hackers,

While testing the Property Graphs, I observed that DROP PROPERTY GRAPH could
generate the "unsupported object class" error.

Indeed, getObjectTypeDescription() and getObjectIdentityParts() are missing switch
cases for PropgraphElementLabelRelationId and PropgraphLabelPropertyRelationId,
causing DROP PROPERTY GRAPH to hit the default case and error out with
"unsupported object class".

The bug only manifests when an event trigger is active, because that is what
calls these functions.

The attached adds the missing cases so that DROP PROPERTY GRAPH, DROP PROPERTY GRAPH
IF EXISTS, and DROP SCHEMA CASCADE on schemas containing property graphs all work
correctly when event triggers are present.

It also adds test cases that create an event trigger and then exercise DROP PROPERTY
GRAPH and DROP SCHEMA CASCADE with property graphs.

I think that's worth an open item and I'll add one for this issue.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: pg_test_timing: fix unit typo and widen diff type
Next
From: Masahiko Sawada
Date:
Subject: Re: Fix pg_upgrade to detect invalid logical replication slots on PG19