From: | Vibhor Kumar <vibhor(dot)kumar(at)enterprisedb(dot)com> |
---|---|
To: | Greg Corradini <gregcorradini(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Dumping functions with pg_dump |
Date: | 2011-04-06 09:31:11 |
Message-ID: | A4BF7E48-6A2F-4894-BA11-D5D58BDDBA3C@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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_namespace where nspname='schemaname');" <dbname>;
Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
vibhor(dot)kumar(at)enterprisedb(dot)com
Blog:http://vibhork.blogspot.com
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-04-06 09:42:31 | Re: Why security-definer functions are executable by public by default? |
Previous Message | Zeev Ben-Sender | 2011-04-06 09:28:13 | Re: Is index rebuilt upon updating table with the same values as already existing in the table? |