Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DA68B2E3190 for ; Mon, 17 Dec 2007 18:07:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 64672-05 for ; Mon, 17 Dec 2007 18:07:56 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D2DE92E3171 for ; Mon, 17 Dec 2007 18:07:54 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lBHM7r6E025766; Mon, 17 Dec 2007 17:07:53 -0500 (EST) To: "Scott Abel" cc: pgsql-admin@postgresql.org Subject: Re: pg_dump --create --schema-only, how to suppress template1 functions ? In-reply-to: References: Comments: In-reply-to "Scott Abel" message dated "Mon, 17 Dec 2007 10:50:18 -0800" Date: Mon, 17 Dec 2007 17:07:53 -0500 Message-ID: <25765.1197929273@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/149 X-Sequence-Number: 27666 "Scott Abel" writes: > Now when I try to run it (still with 8.2.4), the CREATE DATABASE > statement generated uses template0 and then pg_dump regurgitates every > function in my database, including those that came from template1. I > don't use most of the functions and don't want them generated in the > schema file; I really would like to figure out how to get back the old > behavior of pg_dump generating a CREATE DATABASE statement that uses > template1 as the template and only generates DDL for my tables and > functions. How do I do this? I hate to disillusion you, but there never has been any such behavior. pg_dump can barely tell the built-in functions from yours; telling ones that came from template1 additions apart from ones that were added to the specific database is well beyond its powers. What you might be able to do is segregate the template1 additions from the local ones by schema, and then use schema dump restrictions. regards, tom lane