Re: proposal: unescape_text function
От | Asif Rehman |
---|---|
Тема | Re: proposal: unescape_text function |
Дата | |
Msg-id | CADM=JeheQAN2p9r-4U4PXgugYipYkKk5NgHc5UcKcoR4mzmyMA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: proposal: unescape_text function (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: proposal: unescape_text function
|
Список | pgsql-hackers |
On Thu, Jul 2, 2020 at 10:10 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
čt 2. 7. 2020 v 17:27 odesílatel Daniel Gustafsson <daniel@yesql.se> napsal:> 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")));
+}yes, it is my errorI am sending fixed patchThank you for checkPavelcheers ./daniel
Hi Pavel,
select unescape('Odpov\u011Bdn\u00E1 osoba');
Shouldn't the built-in function support the above syntax as well?
--
Asif Rehman
В списке pgsql-hackers по дате отправления: