From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Andrew Walmsley" <andrew(dot)walmsley(at)ttsltd(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: How do you backup functions only? |
Date: | 2006-02-27 15:44:59 |
Message-ID: | 19489.1141055099@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
"Andrew Walmsley" <andrew(dot)walmsley(at)ttsltd(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Hal Davison | 2006-02-27 16:21:50 | Failure Recovery |
Previous Message | Sean Davis | 2006-02-27 15:34:22 | Re: How to enable remote anoymous logins? (+ admin |