Re: Wrong drop procedure example

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: norbert(dot)burza(at)gmail(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Wrong drop procedure example
Date: 2019-08-16 13:34:37
Message-ID: 9205.1565962477@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

PG Doc comments form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Liudmila Mantrova 2019-08-16 17:41:40 Re: readability changes to postgres.sgml
Previous Message PG Doc comments form 2019-08-16 11:03:07 Wrong drop procedure example