Re: Dumping functions with pg_dump - Mailing list pgsql-general

From Vibhor Kumar
Subject Re: Dumping functions with pg_dump
Date
Msg-id A4BF7E48-6A2F-4894-BA11-D5D58BDDBA3C@enterprisedb.com
Whole thread Raw
In response to Dumping functions with pg_dump  (Greg Corradini <gregcorradini@gmail.com>)
List pgsql-general
On Apr 6, 2011, at 4:45 AM, Greg Corradini wrote:

> Hello,
> Is it possible yet in 8.4 to pg_dump specific functions without having to do the whole pg_restore thing?
>
> If it is possible, what is the syntax to dump a specific function?
>
> If not possible, then how does one use pg_restore to target a specific function?
>
> thx

Not from pg_dump. You can use psql to dump the specific functions using pg_get_functiondef(oid)
psql -c "select pg_get_functiondef(oid) from pg_proc where proname='<fnction name>' and pronamespace=(select oid from
pg_namespacewhere nspname='schemaname');" <dbname>; 


Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
vibhor.kumar@enterprisedb.com
Blog:http://vibhork.blogspot.com


pgsql-general by date:

Previous
From: Eric McKeeth
Date:
Subject: Re: pg_dump generating unrestorable data (8.4)
Next
From: Zeev Ben-Sender
Date:
Subject: Re: Is index rebuilt upon updating table with the same values as already existing in the table?