mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
From: t-ishii@sra.co.jp
As Bruce mentioned, this is due to the conflict among changes we made. Included patches should fix the problem(I changed all MB to MULTIBYTE). Please let me know if you have further problem. P.S. I did not include pathces to configure and gram.c to save the file size(configure.in and gram.y modified).
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
* Routines for handling of 'SET var TO',
|
||||
* 'SHOW var' and 'RESET var' statements.
|
||||
*
|
||||
* $Id: variable.c,v 1.9 1998/07/24 03:31:20 scrappy Exp $
|
||||
* $Id: variable.c,v 1.10 1998/07/26 04:30:26 scrappy Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#include "utils/builtins.h"
|
||||
#include "optimizer/internal.h"
|
||||
#ifdef MULTIBYTE
|
||||
#include "regex/pg_wchar.h"
|
||||
#include "mb/pg_wchar.h"
|
||||
#endif
|
||||
|
||||
extern Cost _cpu_page_wight_;
|
||||
@ -522,54 +522,6 @@ reset_timezone()
|
||||
return TRUE;
|
||||
} /* reset_timezone() */
|
||||
|
||||
#ifdef MULTIBYTE
|
||||
/*-----------------------------------------------------------------------*/
|
||||
bool
|
||||
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);
|
||||
} else {
|
||||
if (pg_set_client_encoding(encoding)) {
|
||||
elog(ERROR, "Conversion between %s and %s is not supported",
|
||||
value, pg_encoding_to_char(MULTIBYTE));
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool
|
||||
show_client_encoding()
|
||||
{
|
||||
elog(NOTICE, "Current client encoding is %s",
|
||||
pg_encoding_to_char(pg_get_client_encoding()));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool
|
||||
reset_client_encoding()
|
||||
{
|
||||
int encoding;
|
||||
char *env = getenv("PGCLIENTENCODING");
|
||||
|
||||
if (env) {
|
||||
encoding = pg_char_to_encoding(env);
|
||||
if (encoding < 0) {
|
||||
encoding = MULTIBYTE;
|
||||
}
|
||||
} else {
|
||||
encoding = MULTIBYTE;
|
||||
}
|
||||
pg_set_client_encoding(encoding);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
struct VariableParsers
|
||||
{
|
||||
|
Reference in New Issue
Block a user