Re: How to dump JUST procedures/funnctions?

From: Tony Wasson <ajwasson(at)gmail(dot)com>
To: Carlo Stonebanks <stonec(dot)register(at)sympatico(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to dump JUST procedures/funnctions?
Date: 2010-03-22 23:57:08
Message-ID: 6d8daee31003221657h53f486d7r164b27587415e8c6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Mar 20, 2010 at 11:09 PM, Carlo Stonebanks <
stonec(dot)register(at)sympatico(dot)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 Content-Type Size
dump-all-functions.pl application/octet-stream 2.2 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2010-03-23 00:32:45 Re: Create a function that updates the record with and timestamps
Previous Message Bruce Momjian 2010-03-22 20:14:53 Re: [GENERAL] trouble with to_char('L')