From: | "Carlo Stonebanks" <stonec(dot)register(at)sympatico(dot)ca> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to dump JUST procedures/funnctions? |
Date: | 2010-03-21 06:09:43 |
Message-ID: | ho4d4u$22ch$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
"Andreas Kretschmer" <akretschmer(at)spamfence(dot)net> wrote in message
news:20100320081646(dot)GA26868(at)tux(dot)(dot)(dot)
> Carlo Stonebanks <stonec(dot)register(at)sympatico(dot)ca> wrote:
>
>> I'd like to dump to text the full SQL required to create/replace all
>> user-defined functions within a specific schema - but JUST the function
>> declarations.
>>
>> We are doing server migration and there are some network paths in the
>> code I would like to search and replace.
>
> All functions are stored in pg_catalog.pg_proc, you can search the
> column prosrc for your network paths.
>
> And you can get the whole function-definition with pg_get_functiondef.
>
>
> Okay. Now you can run this select:
>
> select 'select pg_get_functiondef (' || oid || ');' from pg_proc where
> prosrc ~ 'network path';
>
> The result can you use to run as commands to retrieve all
> function-definitions.
>
>
> Andreas
> --
> Really, I'm not out to destroy Microsoft. That will just be a completely
> unintentional side effect. (Linus Torvalds)
> "If I was god, I would recompile penguin with --enable-fly." (unknown)
> Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 2010-03-21 06:11:13 | Re: like operation in tsearch |
Previous Message | AI Rumman | 2010-03-21 05:25:52 | like operation in tsearch |