Skip site navigation (1) Skip section navigation (2)

Re: pg_dump --create --schema-only, how to suppress template1 functions ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Scott Abel" <sabel(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dump --create --schema-only, how to suppress template1 functions ?
Date: 2007-12-17 22:07:53
Message-ID: 25765.1197929273@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
"Scott Abel" <sabel(at)yahoo(dot)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

In response to

pgsql-admin by date

Next:From: GeoffreyDate: 2007-12-17 23:08:41
Subject: Re: Dump database more than 1 flat file
Previous:From: Scott MarloweDate: 2007-12-17 22:04:39
Subject: Re: Dump database more than 1 flat file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group