diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-14 18:37:49 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-14 18:37:49 +0000 |
commit | 2cf48ca04bf59985117e04dd71644a507be90dbb (patch) | |
tree | 6b1033da07f1805a79bcfb67345aba778559d74e /src/backend/utils/mb/mbutils.c | |
parent | 8a9315ca92804bd32b3ee864bf83d98840e1a947 (diff) | |
download | postgresql-2cf48ca04bf59985117e04dd71644a507be90dbb.tar.gz |
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!
Diffstat (limited to 'src/backend/utils/mb/mbutils.c')
-rw-r--r-- | src/backend/utils/mb/mbutils.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/backend/utils/mb/mbutils.c b/src/backend/utils/mb/mbutils.c index 7cf082dc0c..ad1322fe52 100644 --- a/src/backend/utils/mb/mbutils.c +++ b/src/backend/utils/mb/mbutils.c @@ -3,7 +3,7 @@ * client encoding and server internal encoding. * (currently mule internal code (mic) is used) * Tatsuo Ishii - * $Id: mbutils.c,v 1.13 2000/10/30 10:40:28 ishii Exp $ */ + * $Id: mbutils.c,v 1.14 2000/11/14 18:37:44 tgl Exp $ */ #include "postgres.h" @@ -271,6 +271,7 @@ pg_mbcliplen(const unsigned char *mbstr, int len, int limit) * fuctions for utils/init */ static int DatabaseEncoding = MULTIBYTE; + void SetDatabaseEncoding(int encoding) { @@ -289,17 +290,3 @@ getdatabaseencoding(PG_FUNCTION_ARGS) { PG_RETURN_NAME(pg_encoding_to_char(DatabaseEncoding)); } - -/* set and get template1 database encoding */ -static int templateEncoding; -void -SetTemplateEncoding(int encoding) -{ - templateEncoding = encoding; -} - -int -GetTemplateEncoding() -{ - return (templateEncoding); -} |