Re: Wrong drop procedure example - Mailing list pgsql-docs

From Tom Lane
Subject Re: Wrong drop procedure example
Date
Msg-id 9205.1565962477@sss.pgh.pa.us
Whole thread Raw
In response to Wrong drop procedure example  (PG Doc comments form <noreply@postgresql.org>)
List 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 by date:

Previous
From: PG Doc comments form
Date:
Subject: Wrong drop procedure example
Next
From: Liudmila Mantrova
Date:
Subject: Re: readability changes to postgres.sgml