Search Postgresql Archives

Re: Create database bug in 8.1.3 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux