Re: [Bug][patch]: After dropping the last label from a property graph element, invoking pg_get_propgraphdef() triggers an assertion failure

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Bug][patch]: After dropping the last label from a property graph element, invoking pg_get_propgraphdef() triggers an assertion failure
Date: 2026-05-05 03:01:27
Message-ID: 42586CE9-15C1-42C2-A75D-50FD4B949141@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On May 4, 2026, at 22:47, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> On 29.04.26 14:58, Chao Li wrote:
>> As Alvaro commented at [1], I added 0003 to use OidIsValid macro. 0001 and 0002 are unchanged.
>> [1]https://www.postgresql.org/message-id/02fe13db-4fba-4e9d-9b4c- e6271a133502(at)app(dot)fastmail(dot)com
>
> I'm personally not on board with that coding style rule. At least I don't consider this patch necessary right now as we're working toward stabilizing the current code.
>

In the current code in propgraphcmds.c, the style is already inconsistent. I see three forms:

At line 434:
```
if (OidIsValid(opc))
```

At line 754:
```
if (!labeloid)
```

At lne 1302:
```
if (pgrelid == InvalidOid)
```

Anyway, I don’t have a strong opinion here, so please feel free to discard 0003.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-05-05 03:08:29 Re: Fix race condition in pg_get_publication_tables with concurrent DROP TABLE
Previous Message Amit Kapila 2026-05-05 02:56:38 Re: Proposal: Conflict log history table for Logical Replication