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

David Rowley <david.rowley@2ndquadrant.com>

From: David Rowley <david.rowley@2ndquadrant.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-03-20T11:43:26Z
Lists: pgsql-bugs, pgsql-hackers

Attachments

Thanks for reviewing this.

On Wed, 20 Mar 2019 at 04:31, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> I propose maybe more strongly comment fact so noError is applied only on "not found" event. In other cases, this flag is ignored and error is raised immediately there. I think so it is not good enough commented why.
> This is significant change - in previous releases, noError was used like really noError, so should be commented more.

I've made a change to the comments in LookupFuncWithArgs() to make
this more clear. I also ended up renaming noError to missing_ok.
Hopefully this backs up the comments and reduces the chances of
surprises.

> Regress tests are enough.
> The patch is possible to apply without problems and compile without warnings

Thanks. I also fixed a bug that caused an Assert failure when
performing DROP ROUTINE ambiguous_name;  test added for that case too.

> The new status of this patch is: Ready for Committer

Great!

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

Commits

  1. Improve error reporting for DROP FUNCTION/PROCEDURE/AGGREGATE/ROUTINE.