Re: proposal: unescape_text function - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: proposal: unescape_text function
Date
Msg-id 1DF3B9C7-9082-4AFF-930C-4385624F7F30@yesql.se
Whole thread Raw
In response to Re: proposal: unescape_text function  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: proposal: unescape_text function  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
> On 23 Jun 2020, at 11:51, Pavel Stehule <pavel.stehule@gmail.com> wrote:

> I changed the name to more accurately "unicode_unescape". Patch is assigned

You've made this function return Oid, where it used to be void.  Was that a
copy-paste mistake? Else the code needs fixing as it doesn't return an Oid.

+Oid
+check_unicode_value(pg_wchar c)
+{
+   if (!is_valid_unicode_codepoint(c))
+       ereport(ERROR,
+               (errcode(ERRCODE_SYNTAX_ERROR),
+                errmsg("invalid Unicode escape value")));
+}

cheers ./daniel



pgsql-hackers by date:

Previous
From: James Coleman
Date:
Subject: Re: suggest to rename enable_incrementalsort
Next
From: Konstantin Knizhnik
Date:
Subject: Re: Built-in connection pooler