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

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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-27 15:42:50
Message-ID: 397c16a7-f57b-4f81-8497-6d692a9bf596@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2025-08-27 15:54:25 Re: Implement waiting for wal lsn replay: reloaded
Previous Message Peter Eisentraut 2025-08-27 15:42:27 Re: Identifying function-lookup failures due to argument name mismatches