Index: src/backend/utils/mb/encnames.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/mb/encnames.c,v
retrieving revision 1.31
diff -c -r1.31 encnames.c
*** src/backend/utils/mb/encnames.c	14 Jul 2006 14:52:25 -0000	1.31
--- src/backend/utils/mb/encnames.c	22 Mar 2007 03:55:23 -0000
***************
*** 45,50 ****
--- 45,54 ----
  	},							/* EUC-CN; Extended Unix Code for simplified
  								 * Chinese */
  	{
+ 		"eucjis2004", PG_EUC_JIS_2004
+ 	},							/* EUC-JIS-2004; Extended UNIX Code fixed Width for
+ 								 * Japanese, standard JIS X 0213 */
+ 	{
  		"eucjp", PG_EUC_JP
  	},							/* EUC-JP; Extended UNIX Code fixed Width for
  								 * Japanese, standard OSF */
***************
*** 156,161 ****
--- 160,170 ----
  	{
  		"shiftjis", PG_SJIS
  	},							/* Shift_JIS; JIS X 0202-1991 */
+ 
+ 	{
+ 		"shiftjis2004", PG_SHIFT_JIS_2004
+ 	},							/* SHIFT-JIS-2004; Shift JIS for
+ 								 * Japanese, standard JIS X 0213 */
  	{
  		"sjis", PG_SJIS
  	},							/* alias for Shift_JIS */
***************
*** 392,397 ****
--- 401,409 ----
  		"WIN1257", PG_WIN1257
  	},
  	{
+ 		"EUC_JIS_2004", PG_EUC_JIS_2004
+ 	},
+ 	{
  		"SJIS", PG_SJIS
  	},
  	{
***************
*** 405,410 ****
--- 417,425 ----
  	},
  	{
  		"GB18030", PG_GB18030
+ 	},
+ 	{
+ 		"SHIFT_JIS_2004", PG_SHIFT_JIS_2004
  	}
  };
  
Index: src/backend/utils/mb/wchar.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/mb/wchar.c,v
retrieving revision 1.59
diff -c -r1.59 wchar.c
*** src/backend/utils/mb/wchar.c	24 Jan 2007 17:12:17 -0000	1.59
--- src/backend/utils/mb/wchar.c	22 Mar 2007 03:55:25 -0000
***************
*** 1346,1356 ****
  	{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1},		/* 30; PG_WIN1254 */
  	{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1},		/* 31; PG_WIN1255 */
  	{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1},		/* 32; PG_WIN1257 */
! 	{0, pg_sjis_mblen, pg_sjis_dsplen, pg_sjis_verifier, 2},	/* 33; PG_SJIS */
! 	{0, pg_big5_mblen, pg_big5_dsplen, pg_big5_verifier, 2},	/* 34; PG_BIG5 */
! 	{0, pg_gbk_mblen, pg_gbk_dsplen, pg_gbk_verifier, 2},		/* 35; PG_GBK */
! 	{0, pg_uhc_mblen, pg_uhc_dsplen, pg_uhc_verifier, 2},		/* 36; PG_UHC */
! 	{0, pg_gb18030_mblen, pg_gb18030_dsplen, pg_gb18030_verifier, 2}	/* 37; PG_GB18030 */
  };
  
  /* returns the byte length of a word for mule internal code */
--- 1346,1358 ----
  	{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1},		/* 30; PG_WIN1254 */
  	{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1},		/* 31; PG_WIN1255 */
  	{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1},		/* 32; PG_WIN1257 */
! 	{pg_eucjp2wchar_with_len, pg_eucjp_mblen, pg_eucjp_dsplen, pg_eucjp_verifier, 3},	/* 33; PG_EUC_JIS_2004 */
! 	{0, pg_sjis_mblen, pg_sjis_dsplen, pg_sjis_verifier, 2},	/* 34; PG_SJIS */
! 	{0, pg_big5_mblen, pg_big5_dsplen, pg_big5_verifier, 2},	/* 35; PG_BIG5 */
! 	{0, pg_gbk_mblen, pg_gbk_dsplen, pg_gbk_verifier, 2},		/* 36; PG_GBK */
! 	{0, pg_uhc_mblen, pg_uhc_dsplen, pg_uhc_verifier, 2},		/* 37; PG_UHC */
! 	{0, pg_gb18030_mblen, pg_gb18030_dsplen, pg_gb18030_verifier, 2},	/* 38; PG_GB18030 */
! 	{0, pg_sjis_mblen, pg_sjis_dsplen, pg_sjis_verifier, 2}		/* 39; PG_SHIFT_JIS_2004 */
  };
  
  /* returns the byte length of a word for mule internal code */
Index: src/include/mb/pg_wchar.h
===================================================================
RCS file: /cvsroot/pgsql/src/include/mb/pg_wchar.h,v
retrieving revision 1.70
diff -c -r1.70 pg_wchar.h
*** src/include/mb/pg_wchar.h	24 Dec 2006 00:57:48 -0000	1.70
--- src/include/mb/pg_wchar.h	22 Mar 2007 03:55:27 -0000
***************
*** 187,192 ****
--- 187,193 ----
  	PG_WIN1254,					/* windows-1254 */
  	PG_WIN1255,					/* windows-1255 */
  	PG_WIN1257,					/* windows-1257 */
+ 	PG_EUC_JIS_2004,			/* EUC-JIS-2004 */
  	/* PG_ENCODING_BE_LAST points to the above entry */
  
  	/* followings are for client encoding only */
***************
*** 195,205 ****
  	PG_GBK,						/* GBK (Windows-936) */
  	PG_UHC,						/* UHC (Windows-949) */
  	PG_GB18030,					/* GB18030 */
  	_PG_LAST_ENCODING_			/* mark only */
  
  } pg_enc;
  
! #define PG_ENCODING_BE_LAST PG_WIN1257
  
  /*
   * Please use these tests before access to pg_encconv_tbl[]
--- 196,207 ----
  	PG_GBK,						/* GBK (Windows-936) */
  	PG_UHC,						/* UHC (Windows-949) */
  	PG_GB18030,					/* GB18030 */
+ 	PG_SHIFT_JIS_2004,			/* Shift-JIS-2004 */
  	_PG_LAST_ENCODING_			/* mark only */
  
  } pg_enc;
  
! #define PG_ENCODING_BE_LAST PG_EUC_JIS_2004
  
  /*
   * Please use these tests before access to pg_encconv_tbl[]
