Re: cleaning up useless pl/pgsql functions

Поиск
Список
Период
Сортировка
От Mendola Gaetano
Тема Re: cleaning up useless pl/pgsql functions
Дата
Msg-id 002401c33f82$75081c30$10d4a8c0@mm.eutelsat.org
обсуждение исходный текст
Ответ на cleaning up useless pl/pgsql functions  (Tomasz Myrta <jasiek@klaster.net>)
Список pgsql-sql
"Tomasz Myrta" <jasiek@klaster.net> wrote:
> Hi
> Do you have any easy script to remove all pl/pgsql function? After a lot
of
> changes inside "create or replace function..." scripts I have a big mess.
I
> want to remove all user defined pl/pgsql functions and restore some of
them
> from my scripts again.

You shall be able to identify the name of your own function and do:

SELECT 'DROP function ' || proname || ' ('||  oidvectortypes(proargtypes) ||
');' from pg_proc WHERE proname ~ '^sp_';

I identify my own function because the prefix sp_.


I hope that this help you.

Gaetano




В списке pgsql-sql по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: help with "delete joins"
Следующее
От: Rudi Starcevic
Дата:
Сообщение: Re: Bitwise operation