Re: Bug in UTF8-Validation Code?

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Re: Bug in UTF8-Validation Code?
Дата
Msg-id 4613C71F.6010906@markdilger.com
обсуждение исходный текст
Ответ на Re: Bug in UTF8-Validation Code?  ("Albe Laurenz" <all@adv.magwien.gv.at>)
Ответы Re: Bug in UTF8-Validation Code?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Albe Laurenz wrote:
> There's one thing that strikes me as weird in your implementation:
> 
>> pgsql=# select chr(0);
>> ERROR:  character 0x00 of encoding "SQL_ASCII" has no equivalent in
> "UTF8"
> 
> 0x00 is a valid UNICODE code point and also a valid UTF-8 character!

It's not my code that rejects this.  I'm passing the resultant string to 
the pg_verify_mbstr(...) function and it is rejecting a null.  I could 
change that, of course, but if other parts of the system found it 
reasonable to reject null, why should chr() be different?

This was also one of the questions I asked upthread.  Does changing the 
behavior of chr() break people's reasonable expectations?

mark



В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Auto Partitioning
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: Bug in UTF8-Validation Code?