Refactor logic to check for ASCII-only characters in string

Michael Paquier <michael@paquier.xyz>

Commit: 93e8ff8701a65a70ea8826bdde7fdbbd9c285477
Author: Michael Paquier <michael@paquier.xyz>
Date: 2020-12-21T00:37:11Z
Releases: 14.0
Refactor logic to check for ASCII-only characters in string

The same logic was present for collation commands, SASLprep and
pgcrypto, so this removes some code.

Author: Michael Paquier
Reviewed-by: Stephen Frost, Heikki Linnakangas
Discussion: https://postgr.es/m/X9womIn6rne6Gud2@paquier.xyz

Files

PathChange+/−
contrib/pgcrypto/pgp-pgsql.c modified +3 −15
src/backend/commands/collationcmds.c modified +4 −20
src/common/saslprep.c modified +2 −17
src/common/string.c modified +16 −0
src/include/common/string.h modified +1 −0

Discussion