Re: Unicode escapes with any backend encoding - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Unicode escapes with any backend encoding
Date
Msg-id 16526.1583522353@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unicode escapes with any backend encoding  (John Naylor <john.naylor@2ndquadrant.com>)
Responses Re: Unicode escapes with any backend encoding
List pgsql-hackers
John Naylor <john.naylor@2ndquadrant.com> writes:
> Not this patch's job perhaps, but now that check_unicode_value() only
> depends on the input, maybe it can be put into pgwchar.h with other
> static inline helper functions? That test is duplicated in
> addunicode() and pg_unicode_to_server(). Maybe:

> static inline bool
> codepoint_is_valid(pgwchar c)
> {
>    return (c > 0 && c <= 0x10FFFF);
> }

Seems reasonable, done.

> Maybe Chapman has a use case in mind he can test with? Barring that,
> the patch seems ready for commit.

I went ahead and pushed this, just to get it out of my queue.
Chapman's certainly welcome to kibitz some more of course.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Symbolic names for the values of typalign and typstorage
Next
From: Julien Rouhaud
Date:
Subject: Re: WAL usage calculation patch