Re: invalidly encoded strings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: invalidly encoded strings
Date: 2007-09-10 16:21:02
Message-ID: 12726.1189441262@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> BTW, I'm sure this was discussed but I forgot the conclusion: should
>> chr(0) throw an error?

> I think it should, yes.

OK. Looking back, there was also some mention of changing chr's
argument to bigint, but I'd counsel against doing that. We should not
need it since we only support 4-byte UTF8, hence code points only up to
21 bits (and indeed even 6-byte UTF8 can only have 31-bit code points,
no?).

If Tatsuo can find official code-point mappings for any other MB
encodings, +1 on supporting those too.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2007-09-10 16:21:10 Re: integrated tsearch doesn't work with non utf8 database
Previous Message Tom Lane 2007-09-10 16:12:00 Re: integrated tsearch doesn't work with non utf8 database

Browse pgsql-patches by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-09-10 16:25:01 Re: invalidly encoded strings
Previous Message Andrew Dunstan 2007-09-10 16:09:54 Re: invalidly encoded strings