Re: Delete function - Mailing list pgsql-admin

From Gaetano Mendola
Subject Re: Delete function
Date
Msg-id 012f01c1f5c8$bad48a00$d5a9fea9@GMENDOLA2
Whole thread Raw
In response to Delete function  ("Gaetano Mendola" <mendola@bigfoot.com>)
Responses Re: Delete function  ("Rajesh Kumar Mallah." <mallah@trade-india.com>)
List pgsql-admin
"Rajesh Kumar Mallah." <mallah@trade-india.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


pgsql-admin by date:

Previous
From: Jean-Paul ARGUDO
Date:
Subject: Re: [DOCS] Migrating Oracle to PostgreSQL
Next
From: "Rajesh Kumar Mallah."
Date:
Subject: Re: Delete function