Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 51370B5DC40 for ; Tue, 9 Aug 2011 12:55:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 56211-01-3 for ; Tue, 9 Aug 2011 15:55:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from qmta06.westchester.pa.mail.comcast.net (qmta06.westchester.pa.mail.comcast.net [76.96.62.56]) by mail.postgresql.org (Postfix) with ESMTP id 5C759B5DC48 for ; Tue, 9 Aug 2011 12:55:41 -0300 (ADT) Received: from omta18.westchester.pa.mail.comcast.net ([76.96.62.90]) by qmta06.westchester.pa.mail.comcast.net with comcast id JCR71h0081wpRvQ56FvhlA; Tue, 09 Aug 2011 15:55:41 +0000 Received: from homie ([68.45.149.190]) by omta18.westchester.pa.mail.comcast.net with comcast id JFvh1h00246izrY3eFvhqo; Tue, 09 Aug 2011 15:55:41 +0000 Received: by homie (Postfix, from userid 1000) id C3936181A58; Tue, 9 Aug 2011 11:55:39 -0400 (EDT) To: "Bradley Holbrook\, Servillian Technology" Cc: Subject: Re: Dump SQL DDL of all functions in DB References: <044501cc5236$1b376ab0$51a64010$@servillian.com> From: Jerry Sievers Date: Tue, 09 Aug 2011 11:55:39 -0400 In-Reply-To: <044501cc5236$1b376ab0$51a64010$@servillian.com> (Bradley Holbrook's message of "Wed\, 3 Aug 2011 16\:35\:59 -0700") Message-ID: <8739hay3yc.fsf@comcast.net> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.682 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1.929, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.812 X-Spam-Level: X-Archive-Number: 201108/59 X-Sequence-Number: 38046 "Bradley Holbrook, Servillian Technology" 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