ASCII Null control character validation

Поиск
Список
Период
Сортировка
Искать
От
Alexey Chernyshov
Тема
ASCII Null control character validation
Дата
Msg-id
20171130111307.550638eb@PostgresPro-A-Chernyshov
Список
Дерево обсуждения
ASCII Null control character validation Alexey Chernyshov <a.chernyshov@postgrespro.ru>
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>
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
В списке pgsql-hackers по дате отправления
От: David Rowley
Дата:
От: Ashutosh Bapat
Дата:
FAQ