Re: Deleting Functions

Поиск
Список
Период
Сортировка
От Scott Petersen
Тема Re: Deleting Functions
Дата
Msg-id 44EDF18D.4000605@softhome.net
обсуждение исходный текст
Ответ на Re: Deleting Functions  ("Jim Buttafuoco" <jim@contactbda.com>)
Список pgsql-sql
Thanks for those who responded.  It works fine and lasts a long time.  
The following script does NOT require any editing.  It simply executes 
and works.

\pset format unaligned
\pset fieldsep ''
\pset footer
\t
\o drops.sql
select 'drop function ' || nspname || '.' || proname || '(' || 
pg_catalog.oidvectortypes(p.proargtypes) || ') CASCADE;' from
pg_proc p join pg_namespace b on (p.pronamespace=b.oid) where 
nspname='public';
\o
\i drops.sql

Scott.


Jim Buttafuoco wrote:
> Scott,
>
> I use the following query with psql \o option.  Change the schema name from public to whatever.  I am sure you could
put
> this into a plpgsql function using execute as well.
>
>
> Jim
>
> \o drops.sql
> select 'drop function ' || nspname || '.' || proname || '(' || pg_catalog.oidvectortypes(p.proargtypes) || ');' from
> pg_proc p join pg_namespace b on (p.pronamespace=b.oid) where nspname='public';
> \o
> \!vi drops.sql # <<remove the fluff from the query 
> \i drops.sql
>
>
>
>
>   



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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Function to retrieve the Id column
Следующее
От: "Travis Whitton"
Дата:
Сообщение: Performance Problem with sub-select using array