OSDN Git Service

Extend CREATE DATABASE to allow selection of a template database to be
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Nov 2000 18:37:49 +0000 (18:37 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Nov 2000 18:37:49 +0000 (18:37 +0000)
commit2cf48ca04bf59985117e04dd71644a507be90dbb
tree6b1033da07f1805a79bcfb67345aba778559d74e
parent8a9315ca92804bd32b3ee864bf83d98840e1a947
Extend CREATE DATABASE to allow selection of a template database to be
cloned, rather than always cloning template1.  Modify initdb to generate
two identical databases rather than one, template0 and template1.
Connections to template0 are disallowed, so that it will always remain
in its virgin as-initdb'd state.  pg_dumpall now dumps databases with
restore commands that say CREATE DATABASE foo WITH TEMPLATE = template0.
This allows proper behavior when there is user-added data in template1.
initdb forced!
23 files changed:
doc/src/sgml/ref/create_database.sgml
src/backend/commands/dbcommands.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/gram.y
src/backend/parser/keywords.c
src/backend/postmaster/postmaster.c
src/backend/tcop/utility.c
src/backend/utils/init/postinit.c
src/backend/utils/mb/mbutils.c
src/backend/utils/misc/database.c
src/bin/initdb/initdb.sh
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dumpall.sh
src/include/catalog/catversion.h
src/include/catalog/pg_attribute.h
src/include/catalog/pg_class.h
src/include/catalog/pg_database.h
src/include/commands/dbcommands.h
src/include/mb/pg_wchar.h
src/include/nodes/parsenodes.h
src/test/regress/expected/opr_sanity.out