dbTalk Databases Forums  

Re: [BUGS] Server broken down in covering GB18030

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] Server broken down in covering GB18030 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Qingqing Zhou
 
Posts: n/a

Default Re: [BUGS] Server broken down in covering GB18030 - 08-05-2005 , 12:23 AM







My theory is "select;" incurs a parse error and this error message is
supposed to be translated into your encoding, but unfortunately not every
UTF8 character is necessarily be encoded as GB18030, which will cause an
infinite recursive elogs just like this:

1:elog(parse_error) // contain unencodable characters
2: elog(report_not_translatable) // contain unencodable characters
again
3: elog(report_report_not_translatable)
4: elog(report_report_report_not_translatable)
5: ...

and corrupt the elog stack.

To fix this, we could just print a "Unsupport encoding" message which is
just a plain ascii character string and stop the recursion at step 3.

Regards,
Qingqing

"杨邕" <yayooo (AT) gmail (DOT) com> writes
Quote:
template1=# select version();
PostgreSQL 8.0.3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.4.2 (mingw-special)
template1=# create database test1 encoding 'unicode';
test1=# \encoding
UNICODE
test1=# \encoding gb18030
test1=# \encoding
GB18030
test1=# select;
....
比致命错误还过分的错误: ERRORDATA_STACK_SIZE exceeded


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] Server broken down in covering GB18030 - 08-12-2005 , 09:11 PM







Has this been fixed already?

---------------------------------------------------------------------------

Qingqing Zhou wrote:
Quote:
My theory is "select;" incurs a parse error and this error message is
supposed to be translated into your encoding, but unfortunately not every
UTF8 character is necessarily be encoded as GB18030, which will cause an
infinite recursive elogs just like this:

1:elog(parse_error) // contain unencodable characters
2: elog(report_not_translatable) // contain unencodable characters
again
3: elog(report_report_not_translatable)
4: elog(report_report_report_not_translatable)
5: ...

and corrupt the elog stack.

To fix this, we could just print a "Unsupport encoding" message which is
just a plain ascii character string and stop the recursion at step 3.

Regards,
Qingqing

"杨邕" <yayooo (AT) gmail (DOT) com> writes
template1=# select version();
PostgreSQL 8.0.3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.4.2 (mingw-special)
template1=# create database test1 encoding 'unicode';
test1=# \encoding
UNICODE
test1=# \encoding gb18030
test1=# \encoding
GB18030
test1=# select;
...
比致命错误还过分的错误: ERRORDATA_STACK_SIZE exceeded



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Server broken down in covering GB18030 - 08-13-2005 , 02:13 PM



Bruce Momjian <pgman (AT) candle (DOT) pha.pa.us> writes:
Quote:
Has this been fixed already?
No. My suggestion of using bind_textdomain_codeset() might fix it,
but I'm not sufficiently familiar with the NLS code to want to try to
install that myself.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.