Invalid Unicode escape value at or near "\u0000" - Mailing list pgsql-hackers

From Japin Li
Subject Invalid Unicode escape value at or near "\u0000"
Date
Msg-id MEYP282MB16690E768008E758D270C631B6969@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
Responses Re: Invalid Unicode escape value at or near "\u0000"
List pgsql-hackers
Hi, hackers

When I try to insert an Unicode "\u0000", there is an error $subject.

postgres=# CREATE TABLE tbl (s varchar(10));
CREATE TABLE
postgres=# INSERT INTO tbl VALUES (E'\u0000');
ERROR:  invalid Unicode escape value at or near "\u0000"
LINE 1: INSERT INTO tbl VALUES (E'\u0000');
                                  ^

"\u0000" is valid unicode [1], why not we cannot insert it?

[1] https://www.unicode.org/charts/PDF/U0000.pdf

-- 
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.



pgsql-hackers by date:

Previous
From: Japin Li
Date:
Subject: Inconsistent error message for varchar(n)
Next
From: Julien Rouhaud
Date:
Subject: Re: Allow users to choose what happens when recovery target is not reached