Re: [PATCH] polish the error message of creating proc

2022-09-21 Thread Junwang Zhao
On Wed, Sep 21, 2022 at 10:53 PM Tom Lane wrote: > > Junwang Zhao writes: > > I noticed that there are some translations under the backend/po directory, > > can we just change > > msgid "function \"%s\" already exists with same argument types" > > to > > msgid "%s \"%s\" already exists with same

Re: [PATCH] polish the error message of creating proc

2022-09-21 Thread Tom Lane
Junwang Zhao writes: > I noticed that there are some translations under the backend/po directory, > can we just change > msgid "function \"%s\" already exists with same argument types" > to > msgid "%s \"%s\" already exists with same argument types" ? No. This doesn't satisfy our message transla

Re: [PATCH] polish the error message of creating proc

2022-09-21 Thread Julien Rouhaud
On Wed, Sep 21, 2022 at 10:35:47PM +0800, Junwang Zhao wrote: > On Wed, Sep 21, 2022 at 8:17 PM Julien Rouhaud wrote: > > > > You can't put part of the message in parameter, as the resulting string > > isn't > > translatable. You should either use "routine" as a generic term or provide > > 3 >

Re: [PATCH] polish the error message of creating proc

2022-09-21 Thread Junwang Zhao
On Wed, Sep 21, 2022 at 8:17 PM Julien Rouhaud wrote: > > Hi, > > On Wed, Sep 21, 2022 at 07:45:01PM +0800, Junwang Zhao wrote: > > when a error occurs when creating proc, it should point out the > > specific proc kind instead of just printing "function". > > You should have kept the original thre

Re: [PATCH] polish the error message of creating proc

2022-09-21 Thread Julien Rouhaud
Hi, On Wed, Sep 21, 2022 at 07:45:01PM +0800, Junwang Zhao wrote: > when a error occurs when creating proc, it should point out the > specific proc kind instead of just printing "function". You should have kept the original thread in copy (1), or at least mention it. > diff --git a/src/backend/c

[PATCH] polish the error message of creating proc

2022-09-21 Thread Junwang Zhao
when a error occurs when creating proc, it should point out the specific proc kind instead of just printing "function". diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index a9fe45e347..58af4b48ce 100644 --- a/src/backend/catalog/pg_proc.c +++ b/src/backend/catalog/pg_pr