242
242
/* If we have no other source of client_encoding, use server encoding */
243
243
SetConfigOption("client_encoding", GetDatabaseEncodingName(),
244
244
PGC_BACKEND, PGC_S_DEFAULT);
246
/* assign locale variables */
246
/* assign locale variables */
247
247
collate = NameStr(dbform->datcollate);
248
248
ctype = NameStr(dbform->datctype);
250
250
if (setlocale(LC_COLLATE, collate) == NULL)
252
252
(errmsg("database locale is incompatible with operating system"),
253
errdetail("The database was initialized with LC_COLLATE \"%s\", "
254
" which is not recognized by setlocale().", collate),
255
errhint("Recreate the database with another locale or install the missing locale.")));
253
errdetail("The database was initialized with LC_COLLATE \"%s\", "
254
" which is not recognized by setlocale().", collate),
255
errhint("Recreate the database with another locale or install the missing locale.")));
257
257
if (setlocale(LC_CTYPE, ctype) == NULL)
259
259
(errmsg("database locale is incompatible with operating system"),
260
errdetail("The database was initialized with LC_CTYPE \"%s\", "
261
" which is not recognized by setlocale().", ctype),
262
errhint("Recreate the database with another locale or install the missing locale.")));
260
errdetail("The database was initialized with LC_CTYPE \"%s\", "
261
" which is not recognized by setlocale().", ctype),
262
errhint("Recreate the database with another locale or install the missing locale.")));
264
264
/* Make the locale settings visible as GUC variables, too */
265
265
SetConfigOption("lc_collate", collate, PGC_INTERNAL, PGC_S_OVERRIDE);
266
266
SetConfigOption("lc_ctype", ctype, PGC_INTERNAL, PGC_S_OVERRIDE);
623
623
MyProcPort->canAcceptConnections == CAC_WAITBACKUP)
625
625
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
626
errmsg("must be superuser to connect during database shutdown")));
626
errmsg("must be superuser to connect during database shutdown")));
629
629
* Check a normal user hasn't connected to a superuser reserved slot.