Re: ASCII Null control character validation

2017-11-30 Thread Peter Eisentraut
On 11/30/17 03:13, Alexey Chernyshov wrote: > 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: > > I

Re: ASCII Null control character validation

2017-11-30 Thread Tom Lane
Alexey Chernyshov writes: > 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. This is intentional and we're not going to change it. There is too much code in the backend that relies on

ASCII Null control character validation

2017-11-30 Thread Alexey Chernyshov
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\000