On Wed, May 16, 2018 at 03:37:18PM -0400, Robert Haas wrote: > On Wed, May 16, 2018 at 3:29 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > > BTW, we seem to have some confusion here already: > > > > regression=# create function foo(int) returns int as 'select $1' language > > sql; > > CREATE FUNCTION > > regression=# create procedure foo(text) as 'select $1' language sql; > > CREATE PROCEDURE > > regression=# drop function foo; > > ERROR: function name "foo" is not unique > > HINT: Specify the argument list to select the function unambiguously. > > regression=# drop routine foo; > > ERROR: function name "foo" is not unique > > HINT: Specify the argument list to select the function unambiguously. > > regression=# drop procedure foo; > > ERROR: could not find a procedure named "foo" > > > > The first two errors are what I'd expect, but why is the third > > different? > > Good question.
I actually find the first error messages ambiguous as well, so that looks like a bug to me when a lookup is done for those function names. Shouldn't DROP FUNCTION work only on functions and DROP PROCEDURE only on procedures? It is documented that DROP ROUTINE can work on aggregates, functions and procedures, but the docs tell a different story about DROP PROCEDURE and DROP FUNCTION. -- Michael
signature.asc
Description: PGP signature