Re: Invalid Unicode escape value at or near "\u0000"

2021-11-15 Thread Peter Eisentraut
On 13.11.21 06:40, Thomas Munro wrote: Yes, it is a valid codepoint, but unfortunately PostgreSQL can't support it because it sometimes deals in null terminated string, even though internally it does track string data and length separately. We have to do that to use libc facilities like strcoll_

Re: Invalid Unicode escape value at or near "\u0000"

2021-11-13 Thread Japin Li
On Sat, 13 Nov 2021 at 21:52, Andrew Dunstan wrote: > On 11/13/21 00:40, Thomas Munro wrote: >> On Sat, Nov 13, 2021 at 4:32 PM Japin Li wrote: >>> When I try to insert an Unicode "\u", there is an error $subject. >>> >>> postgres=# CREATE TABLE tbl (s varchar(10)); >>> CREATE TABLE >>> pos

Re: Invalid Unicode escape value at or near "\u0000"

2021-11-13 Thread Andrew Dunstan
On 11/13/21 00:40, Thomas Munro wrote: > On Sat, Nov 13, 2021 at 4:32 PM Japin Li wrote: >> When I try to insert an Unicode "\u", there is an error $subject. >> >> postgres=# CREATE TABLE tbl (s varchar(10)); >> CREATE TABLE >> postgres=# INSERT INTO tbl VALUES (E'\u'); >> ERROR: invali

Re: Invalid Unicode escape value at or near "\u0000"

2021-11-12 Thread Thomas Munro
On Sat, Nov 13, 2021 at 4:32 PM Japin Li wrote: > When I try to insert an Unicode "\u", there is an error $subject. > > postgres=# CREATE TABLE tbl (s varchar(10)); > CREATE TABLE > postgres=# INSERT INTO tbl VALUES (E'\u'); > ERROR: invalid Unicode escape value at or near "\u" > LINE