Re: Identifying function-lookup failures due to argument name mismatches - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Identifying function-lookup failures due to argument name mismatches
Date
Msg-id 397c16a7-f57b-4f81-8497-6d692a9bf596@eisentraut.org
Whole thread Raw
In response to Re: Identifying function-lookup failures due to argument name mismatches  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: Identifying function-lookup failures due to argument name mismatches
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Identifying function-lookup failures due to argument name mismatches
Next
From: Xuneng Zhou
Date:
Subject: Re: Implement waiting for wal lsn replay: reloaded