Re: postgres8.3beta encodding problem? - Mailing list pgsql-general

From Tom Lane
Subject Re: postgres8.3beta encodding problem?
Date
Msg-id 29674.1197993608@sss.pgh.pa.us
Whole thread Raw
In response to Re: postgres8.3beta encodding problem?  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> It does seem to be a bit wierd. For single character encodings anything
> up to 255 is OK, well, sort of. It depends on what you want chr() to do
> (oh no, not this discussion again). If you subscribe to the idea that
> it should use unicode code points then the test is completely bogus,
> since whether or not the character is valid has nothing to with whether
> the encoding is multibyte or not.

Well, the advertised purpose of the chr() changes was to prevent
generation of invalid multibyte sequences, not to cut off
potentially-useful functionality.  So I don't think it should be
preventing people from generating non-ASCII single-byte characters.

The test is clearly backwards, because in an MB encoding it will in fact
let you generate invalid encoding ...

            regards, tom lane

pgsql-general by date:

Previous
From: Goboxe
Date:
Subject: Trigger in partitioned table
Next
From: Goboxe
Date:
Subject: Re: Partitioned tables & Slony