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

From Tom Lane
Subject Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
Date
Msg-id 28204.1550694999@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name
List pgsql-bugs
David Rowley <david.rowley@2ndquadrant.com> writes:
> On Wed, 20 Feb 2019 at 18:56, Michael Paquier <michael@paquier.xyz> wrote:
>> I think that the right call is to add the object type into the
>> arguments of LookupFuncName().

I'm not clear how that helps exactly?

> But there are plenty of callers that use LookupFuncName() directly. Do
> you happen to know it's okay for all those to error out with the
> additional error conditions that such a change would move into that
> function?  I certainly don't know that.

The real problem here is that you've unilaterally decided that all callers
of get_object_address() need a particular behavior --- and not only that,
but a behavior that seems fairly surprising and unprincipled, given that
get_object_address's option is documented as "missing_ok" (something the
patch doesn't even bother to change).  It's not very apparent to me why
function-related lookups should start behaving differently from other
lookups in that function, and it's sure not apparent that all callers of
get_object_address() are on board with it.

Should we be propagating that 3-way flag further up, to
get_object_address() callers?  I dunno.

            regards, tom lane


pgsql-bugs by date:

Previous
From: Jerry Sievert
Date:
Subject: Re: BUG #15646: Inconsistent behavior for current_setting/set_config
Next
From: Thomas Munro
Date:
Subject: Re: BUG #15641: Autoprewarm worker fails to start on Windows withhuge pages in use Old PostgreSQL community/pgsql-bugs x