pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: norbert.burza@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Wrong drop procedure example
Date: Fri, 16 Aug 2019 09:34:37 -0400
Message-ID: <9205.1565962477@sss.pgh.pa.us> (raw)
In-Reply-To: <156595338748.1297.13586621579809492028@wrigleys.postgresql.org>
References: <156595338748.1297.13586621579809492028@wrigleys.postgresql.org>

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





view thread (2+ messages)

Message-ID: <9205.1565962477@sss.pgh.pa.us>
Permalink:  ../9205.1565962477@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9205.1565962477@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, norbert.burza@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Wrong drop procedure example
  In-Reply-To: <9205.1565962477@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox