Re: Dump only functions

Поиск
Список
Период
Сортировка
От Raghavendra
Тема Re: Dump only functions
Дата
Msg-id CA+h6AhjvvTx_KSC7yivxaF_Wftnc7qAKZP2wJL8VWG4Wd5+ROQ@mail.gmail.com
обсуждение исходный текст
Ответ на Dump only functions  (Keith Ouellette <Keith.Ouellette@Airgas.com>)
Ответы Re: Dump only functions  (Vasilis Ventirozos <v.ventirozos@gmail.com>)
Re: Dump only functions  (Scott Mead <scottm@openscg.com>)
Список pgsql-admin
On Wed, Mar 27, 2013 at 10:53 PM, Keith Ouellette <Keith.Ouellette@airgas.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';
or
select pg_get_functiondef('foo(integer)'::regprocedure::oid); 
or 
Use other sources like pg_extractor tools. 

---
Regards,
Raghavendra
EnterpriseDB Corporation

 

 

Thanks,

Keith

 


В списке pgsql-admin по дате отправления:

Предыдущее
От: Keith Ouellette
Дата:
Сообщение: Dump only functions
Следующее
От: Vasilis Ventirozos
Дата:
Сообщение: Re: Dump only functions