Re: [HACKERS] fatal copy in/out error (6.5.3)
От | Tatsuo Ishii |
---|---|
Тема | Re: [HACKERS] fatal copy in/out error (6.5.3) |
Дата | |
Msg-id | 20000125140004W.t-ishii@sra.co.jp обсуждение исходный текст |
Ответ на | Re: [HACKERS] fatal copy in/out error (6.5.3) (Michael Robinson <robinson@netrinsics.com>) |
Ответы |
Re: [HACKERS] fatal copy in/out error (6.5.3)
|
Список | pgsql-hackers |
> It could be that one of our users had their input method set to produce > EUC_TW or Big5. > > >In short, the problem you have is caused by: > >1) wrong data submitted into the table > > Kind of hard to control that when data is submitted by random users on > the Internet. Yes, it's not a PostgreSQL's business but is a really big problem in the real world. Maybe some HTML gurus might have good suggestions on these issues (something like using a language tag?) > >I would recommend you delete the data since it's not correct anyway. > >In the mean time I'm going to fix 2) so that it assumes data be > >consisted of 2 bytes even if wrong data sequence is submitted > >(needless to say, except ascii). > >Do you want the backpatch for 6.5.3? > > Very much so. Thank you. Here it is. With this patch, copy out should be happy even with the wrong data. I'm not sure if it could be displayed correctly, though. -- Tatsuo Ishii ------------------------------- cut here ------------------------------------ *** postgresql-6.5.3/src/backend/utils/mb/wchar.c.orig Tue Jan 25 13:37:21 2000 --- postgresql-6.5.3/src/backend/utils/mb/wchar.c Tue Jan 25 13:37:33 2000 *************** *** 166,176 **** { int len; ! if (*s == SS2) ! len = 3; ! else if (*s == SS3) ! len = 3; ! else if (*s & 0x80) len = 2; else len = 1; --- 166,172 ---- { int len; ! if (*s & 0x80) len = 2; else len = 1;
В списке pgsql-hackers по дате отправления: