Re: How do you backup functions only?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How do you backup functions only?
Дата
Msg-id 19489.1141055099@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How do you backup functions only?  ("Andrew Walmsley" <andrew.walmsley@ttsltd.com>)
Список pgsql-novice
"Andrew Walmsley" <andrew.walmsley@ttsltd.com> writes:
> This creates a non-restorable snapshot of the functions. Is there a way
> to output the functions (only) so that they can be restored in one easy
> operation if there is an error in the new code? An option to pg_dump
> that I have missed perhaps?

No, but I'd still recommend using "pg_dump -s -Fc" to backup the
complete database schema including the functions.  A semi-automated
way to extract just the functions from such a dump is to use
pg_restore -l, grep the output for FUNCTION, then feed the resulting
list into pg_restore -L.

            regards, tom lane

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

Предыдущее
От: Sean Davis
Дата:
Сообщение: Re: How to enable remote anoymous logins? (+ admin
Следующее
От: Hal Davison
Дата:
Сообщение: Failure Recovery