From: Jerry Sievers <gsievers19@comcast.net>
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 11:55:39 -0400
Message-ID: <8739hay3yc.fsf@comcast.net> (raw)
In-Reply-To: <044501cc5236$1b376ab0$51a64010$@servillian.com>
References: <044501cc5236$1b376ab0$51a64010$@servillian.com>
"Bradley Holbrook, Servillian Technology" <bholbrook@servillian.com>
writes:
> 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
select pg_get_functiondef(p.oid) || ';'
from pg_proc p
join pg_namespace n on p.pronamespace = n.oid
where n.nspname = 'public'
;
psql -Atq -f...
HTH
> Bradley A Holbrook
>
> Sr. Web Developer
>
> Servillian Technology Ltd
>
> http://www.servillian.com
>
> bholbrook@servillian.com
>
> bholbrook@telus.blackberry.net
>
> Cell: (250) 309 ó 7408
>
> Office: (250) 260 ó 4351 ext. 13
>
> *************************************
>
> For up to the minute news, support notifications and other pertinant information regarding your website or related
> services, you can use the following resources:
>
> Twitter | Facebook | Support Website
>
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 305.321.1144
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: gsievers19@comcast.net, bholbrook@servillian.com
Subject: Re: Dump SQL DDL of all functions in DB
In-Reply-To: <8739hay3yc.fsf@comcast.net>
* 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