From: Joe Conway <mail@joeconway.com>
To: Bradley Holbrook, Servillian Technology <bholbrook@servillian.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Dump SQL DDL of all functions in DB
Date: Tue, 09 Aug 2011 08:25:27 -0700
Message-ID: <4E415167.3010901@joeconway.com> (raw)
In-Reply-To: <044501cc5236$1b376ab0$51a64010$@servillian.com>
References: <044501cc5236$1b376ab0$51a64010$@servillian.com>
On 08/03/2011 04:35 PM, Bradley Holbrook, Servillian Technology wrote:
> Anyone know how to dump the DDL of every function in a schema into one file?
>
> Essentially, I’d like to do something like:
>
> ‘functions ddl dump cmd’ public functions.sql
The easiest way is probably to do a schema-only dump and then edit the
result to eliminate everything you don't want. E.g.:
pg_dump --schema-only --schema=foobar test
Note that "--schema-only" means object definitions without data whereas
"--schema=foobar" is saying to only consider objects in the schema
called foobar. The work "schema" here has two different meanings.
HTH,
Joe
--
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: mail@joeconway.com, bholbrook@servillian.com
Subject: Re: Dump SQL DDL of all functions in DB
In-Reply-To: <4E415167.3010901@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox