Re: deleting procs - Mailing list pgsql-general

From Tom Lane
Subject Re: deleting procs
Date
Msg-id 23451.1056681084@sss.pgh.pa.us
Whole thread Raw
In response to deleting procs  ("Jay O'Connor" <joconnor@cybermesa.com>)
List pgsql-general
"Jay O'Connor" <joconnor@cybermesa.com> writes:
> I want to delete a bunch of procs from the database because I'v stopped
> using some and changed the arguments on others.  Is it sufficient to do
> something like
>     DELETE FROM pg_proc WHERE proname IN (....);
> Or do I have to use DROP FUNCTION to clean anything else up?

In 7.3, DROP FUNCTION would be better since it would (a) check for any
dependencies you forgot and (b) remove the proc's own dependency links
from pg_depend.  You could imagine doing both of those for yourself
though by looking for pg_depend entries pointing to or from the set
of functions you want to zap.  Other than the dependencies, a plain
(non-aggregate) function has no substructure except its pg_proc row.

            regards, tom lane

pgsql-general by date:

Previous
From: "Maksim Likharev"
Date:
Subject: Re: Query plan question
Next
From: Tom Lane
Date:
Subject: Re: How many fields in a table are too many