"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