|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.80 2001/01/24 19:43:16 momjian Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.81 2001/02/16 18:50:40 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *
|
14 | 14 | *-------------------------------------------------------------------------
|
|
30 | 30 | #include"catalog/pg_database.h"
|
31 | 31 | #include"commands/trigger.h"
|
32 | 32 | #include"commands/variable.h"/* for set_default_client_encoding() */
|
| 33 | +#include"mb/pg_wchar.h" |
33 | 34 | #include"miscadmin.h"
|
34 | 35 | #include"storage/backendid.h"
|
35 | 36 | #include"storage/proc.h"
|
|
41 | 42 | #include"utils/syscache.h"
|
42 | 43 | #include"utils/temprel.h"
|
43 | 44 |
|
44 |
| -#ifdefMULTIBYTE |
45 |
| -#include"mb/pg_wchar.h" |
46 |
| -#endif |
47 | 45 |
|
48 | 46 | staticvoidReverifyMyDatabase(constchar*name);
|
49 | 47 | staticvoidInitCommunication(void);
|
@@ -126,10 +124,15 @@ ReverifyMyDatabase(const char *name)
|
126 | 124 |
|
127 | 125 | /*
|
128 | 126 | * OK, we're golden. Only other to-do item is to save the MULTIBYTE
|
129 |
| - * encoding info out of the pg_database tuple. |
| 127 | + * encoding info out of the pg_database tuple --- or complain, if we |
| 128 | + * can't support it. |
130 | 129 | */
|
131 | 130 | #ifdefMULTIBYTE
|
132 | 131 | SetDatabaseEncoding(dbform->encoding);
|
| 132 | +#else |
| 133 | +if (dbform->encoding!=SQL_ASCII) |
| 134 | +elog(FATAL,"database was initialized with MULTIBYTE encoding %d,\n\tbut the backend was compiled without multibyte support.\n\tlooks like you need to initdb or recompile.", |
| 135 | +dbform->encoding); |
133 | 136 | #endif
|
134 | 137 |
|
135 | 138 | heap_endscan(pgdbscan);
|
|