Thread: Refactor routine to check for ASCII-only case

Refactor routine to check for ASCII-only case

From
Michael Paquier
Date:
Hi all,

As mentioned in [1], there are three places where there is the same
routine to check if a string is made only of ASCII characters.

This makes for a small-ish but nice cleanup, as per the attached.

Thanks,

[1]: https://www.postgresql.org/message-id/X9lVLGRuG0hTHrVo@paquier.xyz
--
Michael

Attachment

Re: Refactor routine to check for ASCII-only case

From
Heikki Linnakangas
Date:
On 18/12/2020 05:57, Michael Paquier wrote:
> As mentioned in [1], there are three places where there is the same
> routine to check if a string is made only of ASCII characters.
> 
> This makes for a small-ish but nice cleanup, as per the attached.

+1

- Heikki



Re: Refactor routine to check for ASCII-only case

From
Stephen Frost
Date:
Greetings,

* Heikki Linnakangas (hlinnaka@iki.fi) wrote:
> On 18/12/2020 05:57, Michael Paquier wrote:
> >As mentioned in [1], there are three places where there is the same
> >routine to check if a string is made only of ASCII characters.
> >
> >This makes for a small-ish but nice cleanup, as per the attached.
>
> +1

Yeah, in a quick look, this looks like a good improvement.

Thanks,

Stephen

Attachment

Re: Refactor routine to check for ASCII-only case

From
Michael Paquier
Date:
On Fri, Dec 18, 2020 at 11:30:16AM -0500, Stephen Frost wrote:
> * Heikki Linnakangas (hlinnaka@iki.fi) wrote:
>> +1
>
> Yeah, in a quick look, this looks like a good improvement.

Thanks.  This has been applied as of 93e8ff8.
--
Michael

Attachment