Skip site navigation (1) Skip section navigation (2)

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: pgsql-hackers(at)postgresql(dot)org, andrew(at)supernews(dot)com
Subject: Re: Bug in UTF8-Validation Code?
Date: 2007-04-02 22:37:11
Message-ID: 29864.1175553431@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Mark Dilger <pgsql(at)markdilger(dot)com> writes:
>> pgsql=# select chr(14989485);
>> chr
>> -----
>> 
>> (1 row)

Is there a principled rationale for this particular behavior as
opposed to any other?

In particular, in UTF8 land I'd have expected the argument of chr()
to be interpreted as a Unicode code point, not as actual UTF8 bytes
with a randomly-chosen endianness.

Not sure what to do in other multibyte encodings.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2007-04-02 22:46:15
Subject: Re: [HACKERS] timestamp subtraction (was Re: formatting intervals with to_char)
Previous:From: Bruce MomjianDate: 2007-04-02 22:29:15
Subject: Re: [PATCHES] pg_standby

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group