Re: Escape output of pg_amcheck test - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: Escape output of pg_amcheck test
Date
Msg-id CAJ7c6TPR0q0aaVf389rMYWvPXXo2tpTUDVpB85SMvaEqCiE4qQ@mail.gmail.com
Whole thread Raw
In response to Escape output of pg_amcheck test  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
Hi,

> 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.

LGTM.

I didn't get the part about the /r modifier at first, but "man perlre" helped:

"""
r  - perform non-destructive substitution and return the new value
"""

The /a modifier requires Perl >= 5.14, which is fine [1].

[1]: https://www.postgresql.org/docs/current/install-requirements.html

-- 
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: Geoff Winkless
Date:
Subject: Re: weird GROUPING SETS and ORDER BY behaviour
Next
From: Daniel Gustafsson
Date:
Subject: Re: INFORMATION_SCHEMA note