ASCII Null control character validation - Mailing list pgsql-hackers

From Alexey Chernyshov
Subject ASCII Null control character validation
Date
Msg-id 20171130111307.550638eb@PostgresPro-A-Chernyshov
Whole thread Raw
Responses Re: ASCII Null control character validation  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ASCII Null control character validation  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Hello, hackers!

I found in src/backend/utils/mb/wchar.c: pg_verify_mbstr_len() that it
reports ASCII Null character (\000) as invalid. As for me, it should
pass validation. However, ASCII Null character breaks a line and the
end of the line is missed, try:

INSERT INTO mytable VALUES (E'a\001b\000c and rest of line MIA');

Find patch attached. Am I wrong?

-- 
Alexey Chernyshov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: [HACKERS] Removing LEFT JOINs in more cases
Next
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] create_unique_path and GEQO