mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
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:
parent
f6a3b87c7b
commit
832877e95a
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 *
|
const char *
|
||||||
getdatabaseencoding()
|
getdatabaseencoding()
|
||||||
{
|
{
|
||||||
elog(ERROR, "MultiByte support must be enabled to use this function");
|
return ("SQL_ASCII");
|
||||||
return ("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
pg_encoding_to_char(int encoding)
|
pg_encoding_to_char(int encoding)
|
||||||
{
|
{
|
||||||
elog(ERROR, "MultiByte support must be enabled to use this function");
|
return ("SQL_ASCII");
|
||||||
return ("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pg_char_to_encoding(const char *encoding_string)
|
pg_char_to_encoding(const char *encoding_string)
|
||||||
{
|
{
|
||||||
elog(ERROR, "MultiByte support must be enabled to use this function");
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user