Re: [BUGS] Regarding copy of function from one db to another db

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [BUGS] Regarding copy of function from one db to another db
Дата
Msg-id CAKFQuwZ_qhvC6-j4VXoTkAab8c3v7vAHzHCYDskDZwpDe3xaWQ@mail.gmail.com
обсуждение исходный текст
Ответ на [BUGS] Regarding copy of function from one db to another db  (Rohit Dwivedi <dwivedir092@gmail.com>)
Список pgsql-bugs
On Thu, Jun 15, 2017 at 3:43 AM, Rohit Dwivedi <dwivedir092@gmail.com> wrote:
Hello sir,
            if we need to copy all the functions of database to another database then how  we can implement it other then copy paste and run it...Because there are total 153 functions in our database.


​General questions should be directed to the pgsql-general@postgresql.org mailing list.

The tools provided to do what you want are pg_dump and pg_restore (specifically note the --list and --list-file options to pg_restore).  You will need to manually edit the list file to include only the functions as there is no object type filter capability (well, I now see there is a --function argument to pg_restore but I'm unsure about whether it take wildcards.  You will probably want to try it).  You can restrict the dump to schema only if you indeed only care about functions.

David J.

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

Предыдущее
От: Anthony Sotolongo
Дата:
Сообщение: Re: [BUGS] Regarding copy of function from one db to another db
Следующее
От: 厚积薄发
Дата:
Сообщение: [BUGS] GIN index vacuum hang after pg_rman restore in PG9.2.21