Re: Bug in UTF8-Validation Code?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Dilger <pgsql(at)markdilger(dot)com>
Cc: Albe Laurenz <all(at)adv(dot)magwien(dot)gv(dot)at>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bug in UTF8-Validation Code?
Date: 2007-04-04 17:01:18
Message-ID: 23020.1175706078@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Dilger <pgsql(at)markdilger(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2007-04-04 17:23:49 Re: Synchronized Scan benchmark results
Previous Message David Fetter 2007-04-04 16:43:28 Re: Auto Partitioning