Re: Identifying function-lookup failures due to argument name mismatches

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Identifying function-lookup failures due to argument name mismatches
Дата
Msg-id 397c16a7-f57b-4f81-8497-6d692a9bf596@eisentraut.org
обсуждение исходный текст
Ответ на Re: Identifying function-lookup failures due to argument name mismatches  (Chao Li <li.evan.chao@gmail.com>)
Ответы Re: Identifying function-lookup failures due to argument name mismatches
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления: