Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Ash M <makmarath(at)hotmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
Date: 2019-02-17 22:15:19
Message-ID: CAKJS1f9B=wmgMgBs4T0qfu7SQSDd-adX06CGeqeRUT01+_GASA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Fri, 15 Feb 2019 at 02:42, Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> wrote:
> If nargs as -1 and noError as true can be passed only within
> RemoveObjects() I wonder, could we just end up with a patch which raise
> an error at every ambiguity? That is I mean the following patch:
>
> diff --git a/src/backend/parser/parse_func.c
> b/src/backend/parser/parse_func.c
> index 5222231b51..cce8f49f52 100644
> --- a/src/backend/parser/parse_func.c
> +++ b/src/backend/parser/parse_func.c
> @@ -2053,7 +2053,6 @@ LookupFuncName(List *funcname, int nargs, const
> Oid *argtypes, bool noError)
> {
> if (clist->next)
> {
> - if (!noError)
> ereport(ERROR,
> (errcode(ERRCODE_AMBIGUOUS_FUNCTION),
> errmsg("function name \"%s\" is not unique",
>
> But I may overlook something of course.

I had the same thoughts so I did that in the original patch, but see
Tom's comment which starts with "I don't like that a bit"

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David Rowley 2019-02-17 22:17:52 Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
Previous Message Ramanarayana 2019-02-17 07:15:39 Re: BUG #15548: Unaccent does not remove combining diacritical characters

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2019-02-17 22:17:52 Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
Previous Message Tomas Vondra 2019-02-17 22:08:31 Re: CPU costs of random_zipfian in pgbench