| From: | Mark Dilger <pgsql(at)markdilger(dot)com> |
|---|---|
| To: | Albe Laurenz <all(at)adv(dot)magwien(dot)gv(dot)at> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Bug in UTF8-Validation Code? |
| Date: | 2007-04-04 15:41:19 |
| Message-ID: | 4613C71F.6010906@markdilger.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2007-04-04 15:50:32 | Re: Bug in UTF8-Validation Code? |
| Previous Message | Tom Lane | 2007-04-04 15:39:56 | Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch |