Re: Dump only functions
От | Scott Mead |
---|---|
Тема | Re: Dump only functions |
Дата | |
Msg-id | CAKq0gvKNSwTjHt9oSMJv63eG78Hk2a3y+D-f3P3eLsgBi_U+Ew@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Dump only functions (Raghavendra <raghavendra.rao@enterprisedb.com>) |
Ответы |
Re: Dump only functions
|
Список | pgsql-admin |
On Wed, Mar 27, 2013 at 1:43 PM, Raghavendra <raghavendra.rao@enterprisedb.com> wrote:
Is there a way to dump only functions to a directory with each function as its own file in SQL format?
AFAIK, there's no direct way to dump each function to a separate file. However, you can use system-defined function or system table to retrieve function structure and then write them to separate file each by using bash or perl scripting.select prosrc from pg_proc where proname='foo';orselect pg_get_functiondef('foo(integer)'::regprocedure::oid);
+1 here. pg_extractor is my personal favorite for this type of thing. It can give you all of your objects as separate files if you'd like.
--Scott
В списке pgsql-admin по дате отправления: