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

From Chao Li
Subject Re: Identifying function-lookup failures due to argument name mismatches
Date
Msg-id 7D6E837A-1530-42A6-8421-1ED83A535D18@gmail.com
Whole thread Raw
In response to Re: Identifying function-lookup failures due to argument name mismatches  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers


On Aug 27, 2025, at 23:42, Peter Eisentraut <peter@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/




pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Report reorder buffer size
Next
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: Avoid retaining conflict-related data when no tables are subscribed