Re: Question on error code selection in conflict detection - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Question on error code selection in conflict detection
Date
Msg-id CAFiTN-sGts5xQoxvwL4bNZ3tJKaxqUE7Ob7kwvB=Z-3ejZC1Vw@mail.gmail.com
Whole thread Raw
In response to Re: Question on error code selection in conflict detection  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Wed, Jun 11, 2025 at 7:33 PM Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Tue, Jun 10, 2025 at 2:09 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> > Can we instead try to use other suitable existing error codes?
>
> Why?
>
> I mean, I'm not 100% against using existing error codes, but I feel
> like we might be distorting the meanings of the existing error codes.
> If we used new error codes, then people could test for those and know
> that they would get exactly these conditions and nothing else.
>

To enhance the clarity and specificity of our error reporting,
particularly for logical replication conflicts, I suggest we consider
defining a dedicated class of error codes, much like we have for FDWs.
IMHO this would be a more future-proof approach, given the potential
for many new conflict detection types in the future.

--
Regards,
Dilip Kumar
Google



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: add function for creating/attaching hash table in DSM registry
Next
From: Jeff Davis
Date:
Subject: Re: [19] Proposal: function markers to indicate collation/ctype sensitivity