Re: How do you backup functions only? - Mailing list pgsql-novice

From Tom Lane
Subject Re: How do you backup functions only?
Date
Msg-id 19489.1141055099@sss.pgh.pa.us
Whole thread Raw
In response to How do you backup functions only?  ("Andrew Walmsley" <andrew.walmsley@ttsltd.com>)
List 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 by date:

Previous
From: Sean Davis
Date:
Subject: Re: How to enable remote anoymous logins? (+ admin
Next
From: Hal Davison
Date:
Subject: Failure Recovery