text cast on regprocedure fails on 8.2

From: "Jan-Peter Seifert" <Jan-Peter(dot)Seifert(at)gmx(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Subject: text cast on regprocedure fails on 8.2
Date: 2009-08-20 10:38:13
Message-ID: 20090820103813.77330@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello,

for dropping all functions within the current schema I use this SQL query:

SELECT DISTINCT 'DROP FUNCTION ' || p.oid::regprocedure::text || ' CASCADE;' FROM pg_catalog.pg_proc p LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace WHERE n.nspname = current_schema();

It works fine on 8.3. It fails on 8.2 with the error message that conversion to text is not possible for data type regprocedure.

I didn't see any explicit type cast in 8.3 for regprocedure -> text. Is there a way to add it in 8.2?

Thank you very much,

Peter
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Oliveiros 2009-08-20 11:10:25 Trouble with postgres user's password on Windows
Previous Message Kumar Anand 2009-08-20 09:36:45 select count is too slow