| From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Subject: | Re: Fix DROP PROPERTY GRAPH "unsupported object class" error |
| Date: | 2026-04-23 11:01:02 |
| Message-ID: | aen77u5go8P7RJaL@bdtpg |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Thu, Apr 23, 2026 at 12:57:37PM +0530, Ashutosh Bapat wrote:
> On Thu, Apr 23, 2026 at 12:09 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > On Wed, Apr 22, 2026 at 04:19:26PM +0000, Bertrand Drouvot wrote:
> > > 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".
> >
> > Hmm. Couldn't these code paths be reached as well with the object
> > functions like pg_describe_object(), pg_get_object_address(),
> > pg_identify_object_as_address() or pg_identify_object()? Object
> > descriptions usually stick within object_address.sql. The new objects
> > you would want to stick should be covered as well in this test suite,
> > and the file already has some property graphs in it.
>
> +1. See emails around [1] for some discussion about existing property
> graph object definitions.
Yeah that makes sense to also add some tests here, done in the attached.
> > > The bug only manifests when an event trigger is active, because that is what
> > > calls these functions.
> >
> That covers everything you want to test and its minimal change to the
> test. But I see that the event triggers for all objects are tested in
> event_triggers.sql. So I think the new test should be added to that
> file.
A simpler test has been done in event_trigger.sql instead.
> > > I think that's worth an open item and I'll add one for this issue.
> >
> > This should be an open item, I guess, yes. Could you add one?
One has already been created (I think you need to be logged in to see the
updates).
> Element label, label property are not user visible objects per say, so
> I am not sure whether the code changes are in the right direction. But
> it's also true that we shouldn't get an error in the presence of an
> event trigger. We need to fix that.
Agreed.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Fix-DROP-PROPERTY-GRAPH-unsupported-object-class-.patch | text/x-diff | 10.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2026-04-23 11:01:57 | Re: Adding REPACK [concurrently] |
| Previous Message | Zhijie Hou (Fujitsu) | 2026-04-23 10:37:07 | RE: StringInfo fixes, v19 edition. Plus a few oddities |