diff options
author | Tatsuo Ishii <ishii@postgresql.org> | 1999-05-13 10:28:26 +0000 |
---|---|---|
committer | Tatsuo Ishii <ishii@postgresql.org> | 1999-05-13 10:28:26 +0000 |
commit | 0c1e2e493d4056b2ed0f62be41ef17d1ed49c11a (patch) | |
tree | c154f02d43db21b3826e0186b281cf9947688e20 /src/backend/utils/mb/variable.c | |
parent | 507a0a2ab09144f524e3239b7fc201ad1ad1b78e (diff) |
set client_encoding to <nothing> crashes backend.
Diffstat (limited to 'src/backend/utils/mb/variable.c')
-rw-r--r-- | src/backend/utils/mb/variable.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/utils/mb/variable.c b/src/backend/utils/mb/variable.c index 37b95ccf120..0b2ffacd644 100644 --- a/src/backend/utils/mb/variable.c +++ b/src/backend/utils/mb/variable.c @@ -2,7 +2,7 @@ * This file contains some public functions * related to show/set/reset variable commands. * Tatsuo Ishii - * $Id: variable.c,v 1.2 1998/09/01 04:33:24 momjian Exp $ + * $Id: variable.c,v 1.3 1999/05/13 10:28:26 ishii Exp $ */ #include "mb/pg_wchar.h" @@ -13,8 +13,13 @@ parse_client_encoding(const char *value) int encoding; encoding = pg_valid_client_encoding(value); - if (encoding < 0) - elog(ERROR, "Client encoding %s is not supported", value); + if (encoding < 0) { + if (value) { + elog(ERROR, "Client encoding %s is not supported", value); + } else { + elog(ERROR, "No client encoding is specified"); + } + } else { if (pg_set_client_encoding(encoding)) |