Re: Create database bug in 8.1.3 ?

From: "William ZHANG" <uniware(at)zedware(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Create database bug in 8.1.3 ?
Date: 2006-04-09 12:37:26
Message-ID: e1av3c$1i58$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The backend doesnot save the name of the template database used by
"CREATE DATABASE".

pg_dump, pg_dumpall have hard code like this:
appendPQExpBuffer(buf, " WITH TEMPLATE = template0");
That's why you found the template database is always `template0`.

If the backend saves the name of the template database, and dump the
database as
"CREATE DATABASE foo WITH TEMPLATE 'bar';",
dump and restore should be careful to dump/restore 'bar' before 'foo'. If
'bar' is
modified after the "CREATE DATABASE" command, things will be more
complicated.

If you have not modified system catalogs in template1, using template0 in
dump
should cause no problem.

Regrads,
William ZHANG

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Milen Kulev 2006-04-09 13:35:50 Re: Create database bug in 8.1.3 ? -> solved
Previous Message Robert Bernier 2006-04-09 11:40:58 Re: LW Boston