Re: Unicode escapes with any backend encoding

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Naylor <john(dot)naylor(at)2ndquadrant(dot)com>
Cc: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Unicode escapes with any backend encoding
Date: 2020-03-06 19:19:13
Message-ID: 16526.1583522353@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

John Naylor <john(dot)naylor(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2020-03-06 19:19:17 Re: WAL usage calculation patch
Previous Message Tom Lane 2020-03-06 19:10:17 Re: Symbolic names for the values of typalign and typstorage