Re: cleaning up useless pl/pgsql functions - Mailing list pgsql-sql

From Mendola Gaetano
Subject Re: cleaning up useless pl/pgsql functions
Date
Msg-id 002401c33f82$75081c30$10d4a8c0@mm.eutelsat.org
Whole thread Raw
In response to cleaning up useless pl/pgsql functions  (Tomasz Myrta <jasiek@klaster.net>)
List 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 by date:

Previous
From: Robert Treat
Date:
Subject: Re: help with "delete joins"
Next
From: Rudi Starcevic
Date:
Subject: Re: Bitwise operation