> On Aug 27, 2025, at 23:42, Peter Eisentraut <pe...@eisentraut.org> wrote: > > On 25.08.25 04:43, Chao Li wrote: >> Can we avoid the duplication in a way like: >> ``` >> static int >> func_lookup_failure_details(int fgc_flags, List *argnames, bool proc_call) >> { >> const char *func_kind = proc_call ? "procedure" : "function"; >> /* >> if (proc_call) >> return errdetail("There is no procedure of that name."); >> else >> return errdetail("There is no function of that name."); >> */ >> return errdetail("There is no %s of that name.", func_kind); >> ``` > > No, see here: > https://www.postgresql.org/docs/devel/nls-programmer.html#NLS-GUIDELINES
Thank you Peter very much. It is good to learn. -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/