Re: Request for Implementation of Custom Error Messages for CHECK Constraints - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Request for Implementation of Custom Error Messages for CHECK Constraints
Date
Msg-id CAKFQuwbezTS9OESdzY6S2Vzj27MTj9KT=ZSk-FDv3gx1iUzVUw@mail.gmail.com
Whole thread Raw
In response to Re: Request for Implementation of Custom Error Messages for CHECK Constraints  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Monday, May 12, 2025, Bruce Momjian <bruce@momjian.us> wrote:

Yeah, you could name the constraint
"Custom_error_message_when_the_condition_is_not_met." and then just
convert underscore to spaces and display that to the user.


 The 63 byte limit seems much more likely to be a factor if the name has to serve the duty of a human-friendly error message.

David J.

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Request for Implementation of Custom Error Messages for CHECK Constraints
Next
From: Andreas Karlsson
Date:
Subject: Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2