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

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dominique Devienne <ddevienne(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Identifying function-lookup failures due to argument name mismatches
Date: 2025-08-28 01:53:15
Message-ID: 7D6E837A-1530-42A6-8421-1ED83A535D18@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2025-08-28 02:23:56 Avoid retaining conflict-related data when no tables are subscribed
Previous Message Masahiko Sawada 2025-08-28 00:26:17 Re: Report reorder buffer size