Re: How to dump JUST procedures/funnctions? - Mailing list pgsql-general

From Tony Wasson
Subject Re: How to dump JUST procedures/funnctions?
Date
Msg-id 6d8daee31003221657h53f486d7r164b27587415e8c6@mail.gmail.com
Whole thread Raw
In response to Re: How to dump JUST procedures/funnctions?  ("Carlo Stonebanks" <stonec.register@sympatico.ca>)
Responses Re: How to dump JUST procedures/funnctions?
List pgsql-general
On Sat, Mar 20, 2010 at 11:09 PM, Carlo Stonebanks <stonec.register@sympatico.ca> wrote:
Is pg_get_functiondef an 8.4 appears to be an 8.4 function?

I don't see it in the 8.3 documentation and the servers in question are all 8.3.

Any alternatives for 8.3? pg_proc has the code body, but not the function declaration, etc.


I've attached a simple perl script to dump all functions per schema from a database. I won't claim this is perfect, but it does the trick for me.

Works with 8.3. If you have 2 functions called public.foo, it will put them in public/foo.sql with CREATE OR REPLACE FUNCTION formatting around it.

Hope this is useful to others.
Tony Wasson


Attachment

pgsql-general by date:

Previous
From: Igor
Date:
Subject: server-side extension in c++
Next
From: Adrian Klaver
Date:
Subject: Re: Create a function that updates the record with and timestamps