Re: [GENERAL] How to delete all operators

2006-04-03 Thread Jim Nasby
On Mar 31, 2006, at 5:17 AM, Martin Pohl wrote: Is there any way to drop all operators (given they are all in the schema "public) in a script? Something like (pseudocode): Drop all operators in schema "public" Nope, though information_schema or the newsysviews project on pgFoundry might ma

Re: [GENERAL] How to delete all operators

2006-04-03 Thread William Leite Araújo
  You can make a function to do this.  CREATE FUNCTION drop_operators(text) RETURNS BOOL AS   $$  DECLARE    op record;  BEGIN    FOR op IN SELECT opname FROM pg_operator as o left join pg_namespace as n on (o.oprnamespace = n.oid) WHERE nspname = $1

[GENERAL] How to delete all operators

2006-03-31 Thread Martin Pohl
Hi, I have a database with operators and functions in plpgsql. To update the data to the latest version I would like to drop all operators. There might be some, that I don't know. I don't have access to the database, but have to write a script, that will update the data. Is there any way to drop