Re: deleting procs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jay O'Connor" <joconnor(at)cybermesa(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: deleting procs
Date: 2003-06-27 02:31:24
Message-ID: 23451.1056681084@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jay O'Connor" <joconnor(at)cybermesa(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-06-27 02:40:07 Re: How many fields in a table are too many
Previous Message Maksim Likharev 2003-06-27 01:14:13 Re: Query plan question