Re: Delete function

From: "Gaetano Mendola" <mendola(at)bigfoot(dot)com>
To: "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Delete function
Date: 2002-05-07 13:11:41
Message-ID: 012f01c1f5c8$bad48a00$d5a9fea9@GMENDOLA2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Rajesh Kumar Mallah." <mallah(at)trade-india(dot)com> wrote:
> eg
> regression=> \o command.sql
> regression=> select 'DROP function ' || proname from pg_proc WHERE
proname
> ~ '^sp_';
>
> then psql -f command.sql

This work fine with the views, unfortunately when you drop a function you
should specify the argument type, so I did in this way (I think is the clean
way):

$ psql -t -c "SELECT 'DROP function ' || proname || ' ('||
oidvectortypes(proargtypes) || ');' from pg_proc WHERE proname ~ '^sp_'" >
todelete.sql
$ psql -f todelete.sql

Ciao
Gaetano

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rajesh Kumar Mallah. 2002-05-07 13:16:00 Re: Delete function
Previous Message Gaetano Mendola 2002-05-07 10:35:07 pg_dump failed