pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Scott Abel <sabel@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_dump --create --schema-only, how to suppress template1 functions ?
Date: Mon, 17 Dec 2007 17:07:53 -0500
Message-ID: <25765.1197929273@sss.pgh.pa.us> (raw)
In-Reply-To: <c51a85180712171050j4e4ced30sfec6d6f9eb2b4371@mail.gmail.com>
References: <c51a85180712171050j4e4ced30sfec6d6f9eb2b4371@mail.gmail.com>

"Scott Abel" <sabel@yahoo.com> 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



view thread (2+ messages)

Message-ID: <25765.1197929273@sss.pgh.pa.us>
Permalink:  ../25765.1197929273@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25765.1197929273@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, sabel@yahoo.com
  Subject: Re: pg_dump --create --schema-only, how to suppress template1 functions ?
  In-Reply-To: <25765.1197929273@sss.pgh.pa.us>

* 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