Re: Odd procedure resolution

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Odd procedure resolution
Дата
Msg-id 20180517004755.GA2144@paquier.xyz
обсуждение исходный текст
Ответ на Re: Odd procedure resolution  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Wed, May 16, 2018 at 03:37:18PM -0400, Robert Haas wrote:
> On Wed, May 16, 2018 at 3:29 PM, Tom Lane <tgl@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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Postgres 11 release notes
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Postgres 11 release notes