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>
Re: cleaning up useless pl/pgsql functions Rod Taylor <rbt@rbt.ca>
Re: cleaning up useless pl/pgsql functions Tomasz Myrta <jasiek@klaster.net>
Re: cleaning up useless pl/pgsql functions Josh Berkus <josh@agliodbs.com>
"Tomasz Myrta"  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
FAQ