pg_dump, pg_restore and template relationships - Mailing list pgsql-novice

From Mark S
Subject pg_dump, pg_restore and template relationships
Date
Msg-id 47B8DB4B.5050606@gravitycollege.com
Whole thread Raw
Responses Re: pg_dump, pg_restore and template relationships
List pgsql-novice
I'm moving a PostgreSQL cluster from one server to another, and in the
process also moving from 7.4 to 8.1. On the home server I have a
template database called template_postgis that I used to create a
couple other databases.  According to the PostgreSQL docs, changes made
to a template will be effected on databases created from that
template.  I'm curious how, if at all, this relationship is maintained
through a pg_dump and pg_restore?  In particular, let's say I have
template "A" and I create database "B" from it.  If I want to dump "B"
and restore it elsewhere, will the dump of "B" include all of the
functions / types that it inherits from "A", or for to maintain
functionality do I need to dump and restore "A" first, then "B"
afterwards?

I've looked through the docs on pg_dump and pg_restore but I wasn't
able to find the answers to this.

Thank you,
Mark

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Query Planner Issue - View and regexp_replace?
Next
From: Brandon Kane
Date:
Subject: Re: Query Planner Issue - View and regexp_replace?