Re: deleting procs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: deleting procs
Дата
Msg-id 23451.1056681084@sss.pgh.pa.us
обсуждение исходный текст
Ответ на deleting procs  ("Jay O'Connor" <joconnor@cybermesa.com>)
Список 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 по дате отправления:

Предыдущее
От: "Maksim Likharev"
Дата:
Сообщение: Re: Query plan question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How many fields in a table are too many