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_catal
"Jim Buttafuoco" <[EMAIL PROTECTED]> writes:
> 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';
Seems like you could do that more easily with
||
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 # <
To: pgsql-sql@postgresql.org
Sent: Wed, 23 Aug 2006 13:29:12 -0600
Subject: [SQL] Deleting Functions
> Folks,
>
Folks,
I am using PGSQL do do all of my schema changes, but have run into a
problem. I need to be able to DROP all of the USER FUNCTIONS that are
defined in a schema. The problem is that I do not know the names of all
of the functions and parameters. I know that I could use '\df' and then