Mark Dilger <pgsql@markdilger.com> writes:
> Albe Laurenz wrote:
>> 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?
chr() really should reject that if it's going to do any error checking
at all, because text operations tend to misbehave on embedded nulls.
regards, tom lane