From c0b01461db59a472f5817a8c6e99091b8a48ffc5 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 24 Aug 1998 01:14:24 +0000 Subject: o note that now pg_database has a new attribuite "encoding" even if MULTIBYTE is not enabled. So be sure to run initdb. o these patches are made against the latest source tree (after Bruce's massive patch, I think) BTW, I noticed that after running regression, the oid field of pg_type seems disappeared. regression=> select oid from pg_type; ERROR: attribute 'oid' not found this happens after the constraints test. This occures with/without my patches. strange... o pg_database_mb.h, pg_class_mb.h, pg_attribute_mb.h are no longer used, and shoud be removed. o GetDatabaseInfo() in utils/misc/database.c removed (actually in #ifdef 0). seems nobody uses. t-ishii@sra.co.jp --- src/backend/commands/dbcommands.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/backend/commands/dbcommands.c') diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index a0438129dff..80cb60f203a 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.20 1998/08/19 02:01:46 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.21 1998/08/24 01:13:40 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -43,7 +43,7 @@ static HeapTuple get_pg_dbtup(char *command, char *dbname, Relation dbrel); static void stop_vacuum(char *dbpath, char *dbname); void -createdb(char *dbname, char *dbpath) +createdb(char *dbname, char *dbpath, int encoding) { Oid db_id, user_id; @@ -90,8 +90,9 @@ createdb(char *dbname, char *dbpath) dbname, user_id, dbname); #endif - sprintf(buf, "insert into pg_database (datname, datdba, datpath)" - " values (\'%s\', \'%d\', \'%s\');", dbname, user_id, loc); + sprintf(buf, "insert into pg_database (datname, datdba, encoding, datpath)" + " values (\'%s\', \'%d\', \'%d\', \'%s\');", dbname, user_id, encoding, loc); + pg_exec_query(buf); } -- cgit v1.2.3