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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Ash M <makmarath@hotmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-02-10T22:39:19Z
Lists: pgsql-bugs, pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> Updated patch attached again.  This time due to a newly added call to
> LookupFuncName()  in 1fb57af92.

Hmm ... I'd not looked at this before, but now that I do, the new API
for LookupFuncName seems mighty confused, or at least confusingly
documented.  It's not clear what the combinations of the flags actually
do, or why you'd want to use them.

I wonder whether you'd be better off replacing the two bools with an
enum, or something like that.

			regards, tom lane


Commits

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