Re: Escape output of pg_amcheck test

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Re: Escape output of pg_amcheck test
Дата
Msg-id 59e4f283-d04d-70b4-012f-6e18a38c8e54@gmail.com
обсуждение исходный текст
Ответ на Escape output of pg_amcheck test  (Peter Eisentraut <peter@eisentraut.org>)
Ответы Re: Escape output of pg_amcheck test
Список pgsql-hackers

On 1/7/24 23:27, Peter Eisentraut wrote:
> The pg_amcheck reports a skip message if the layout of the index does 
> not match expectations.  That message includes the bytes that were 
> expected and the ones that were found.  But the found ones are arbitrary 
> bytes, which can have funny effects on the terminal when they are 
> printed.  To avoid that, escape non-word characters before printing.

> +            # escape non-word characters to avoid confusing the terminal
> +            $b =~ s{(\W)}{ sprintf '\x%02x', ord($1) }aegr);

The /r modifier defeats the purpose of the patch, at least for my perl 
version, perl 5, version 28, subversion 1 (v5.28.1).  With just the /aeg 
modifier, it works fine.

-- 
Mark Dilger



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: Escape output of pg_amcheck test