Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group