Re: [rfc] unicode escapes for extended strings - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: [rfc] unicode escapes for extended strings
Date
Msg-id e51f66da0904170907v51cfb917r95be803276e16bba@mail.gmail.com
Whole thread Raw
In response to Re: [rfc] unicode escapes for extended strings  (Marko Kreen <markokr@gmail.com>)
Responses Re: [rfc] unicode escapes for extended strings
Re: [rfc] unicode escapes for extended strings
List pgsql-hackers
On 4/16/09, Marko Kreen <markokr@gmail.com> wrote:
> It's up to UTF8 validator whether to consider non-characters as error.

I checked, and it did not work well, as addunicode() did not set
the saw_high_bit variable.when outputting UTF8.  Attached patch fixes it.

Currently is would be NOP as pg_verifymbstr() only checks for invalid UTF8,
and addunicode cannot output it, but in the future we may want to reject
some codes, so now it can.

Btw, is there any good reason why we don't reject \000, \x00
in text strings?

Currently I made addunicode() do it, because it seems sensible.

--
marko

Attachment

pgsql-hackers by date:

Previous
From: Alberto J. Castiñeira P.
Date:
Subject: oid in a where
Next
From: Tom Lane
Date:
Subject: Re: Replacing plpgsql's lexer