Re: Wrong drop procedure example

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Wrong drop procedure example
Дата
Msg-id 9205.1565962477@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Wrong drop procedure example  (PG Doc comments form <noreply@postgresql.org>)
Список pgsql-docs
PG Doc comments form <noreply@postgresql.org> writes:
> I noticed that drop procedure with parenthesis doesn't work (procedure name
> not found), but without parenthesis it works.
> Not OK: DROP PROCEDURE do_db_maintenance();
> OK: DROP PROCEDURE do_db_maintenance;

Works for me:

regression=# create procedure do_db_maintenance() as 'begin end' language plpgsql;
CREATE PROCEDURE
regression=# DROP PROCEDURE do_db_maintenance();
DROP PROCEDURE

This depends, of course, on how you declared the procedure (with
or without any parameters).

If we wrote the example without parens, that would just move the
set of failure conditions around, so I'm unconvinced that it'd
be an improvement.

            regards, tom lane



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

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: Wrong drop procedure example
Следующее
От: Liudmila Mantrova
Дата:
Сообщение: Re: readability changes to postgres.sgml