| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | "Chao Li" <li(dot)evan(dot)chao(at)gmail(dot)com>, "Ashutosh Bapat" <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
| Cc: | "L(dot) pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Property graph: fix error handling when dropping non-existent label property |
| Date: | 2026-04-29 09:51:55 |
| Message-ID: | 02fe13db-4fba-4e9d-9b4c-e6271a133502@app.fastmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2026-04-29, Chao Li wrote:
>> Looks good to me. However, I did change OidIsValid() and !OidIsValid()
>> back to (oid) and (!oid) conditions to be consistent with the rest of
>> the code.
>
> In the file, I also see:
> ```
> if (pgrelid == InvalidOid)
> ```
>
> Should we take this opportunity to change to use OidIsValid()
> everywhere in the file? As this feature is new to PG19, we can cleanup
> the inconsistency before releasing v19. Otherwise some people might
> also file a cleanup patch for this in the future.
Yeah, I find "if (oid)" a rather terrible coding pattern. The negative one is perhaps not so bad, but I'd keep both cases similar by using the macro in both, for consistency.
--
Álvaro Herrera
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ayush Tiwari | 2026-04-29 10:03:20 | Re: [PATCH] Fix duplicate errmsg in ALTER TABLE SPLIT PARTITION |
| Previous Message | JoongHyuk Shin | 2026-04-29 09:29:59 | Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks |