From: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, kksrcv001(at)gmail(dot)com, Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: Add missing error codes to PANIC/FATAL error reports in xlog.c and relcache.c |
Date: | 2024-02-26 12:42:33 |
Message-ID: | CAN55FZ114vZ4_Egm0EfWUZYR_6XYpOXNckyaux4rgTBJDerwpA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Fri, 23 Feb 2024 at 15:34, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > On 23 Feb 2024, at 13:09, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
>
> > Does errmsg_internal() need to be used all the time when turning elogs
> > into ereports? errmsg_internal()'s comment says that "This should be
> > used for "can't happen" cases that are probably not worth spending
> > translation effort on.". Is it enough to check if the error message
> > has a translation, and then decide the use of errmsg_internal() or
> > errmsg()?
>
> If it's an elog then it won't have a translation as none are included in the
> translation set. If the errmsg is generic enough to be translated anyways via
> another (un)related ereport call then we of course use that, but ideally not
> create new ones.
Thanks for the explanation.
All of your feedback is addressed in v2.
--
Regards,
Nazir Bilal Yavuz
Microsoft
Attachment | Content-Type | Size |
---|---|---|
v2-0001-xlog.c-Add-missing-error-codes-to-PANIC-FATAL-err.patch | text/x-diff | 11.4 KB |
v2-0002-relcache.c-Add-missing-error-codes-to-PANIC-FATAL.patch | text/x-diff | 2.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bertrand Drouvot | 2024-02-26 13:13:56 | Re: Synchronizing slots from primary to standby |
Previous Message | Andrei Lepikhov | 2024-02-26 12:29:12 | Re: "type with xxxx does not exist" when doing ExecMemoize() |