Modify getdatabaseencoding(), pg_encoding_to_char()

pg_char_to_encoding() in multibyte disbaled case so that it does not
throw an error, rather return HARD CODED default value (currently SQL_ASCII).
This would solve the "non-mb backend vs. mb-enabled frontend" problem.
This commit is contained in:
Tatsuo Ishii 2000-05-02 08:13:08 +00:00
parent f6a3b87c7b
commit 832877e95a
1 changed files with 3 additions and 6 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.45 2000/04/12 17:16:02 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.46 2000/05/02 08:13:08 ishii Exp $
*
*-------------------------------------------------------------------------
*/
@ -102,21 +102,18 @@ SetDatabaseName(const char *name)
const char *
getdatabaseencoding()
{
elog(ERROR, "MultiByte support must be enabled to use this function");
return ("");
return ("SQL_ASCII");
}
const char *
pg_encoding_to_char(int encoding)
{
elog(ERROR, "MultiByte support must be enabled to use this function");
return ("");
return ("SQL_ASCII");
}
int
pg_char_to_encoding(const char *encoding_string)
{
elog(ERROR, "MultiByte support must be enabled to use this function");
return (0);
}