Handle alphanumeric characters in matching GUC names
authorDaniel Gustafsson <[email protected]>
Thu, 24 Oct 2024 13:20:16 +0000 (15:20 +0200)
committerDaniel Gustafsson <[email protected]>
Thu, 24 Oct 2024 13:20:16 +0000 (15:20 +0200)
The check for whether all GUCs are present in the sample config
file used the POSIX character class :alpha: which corresponds to
alphabet and not alphanumeric. Since GUC names can contain digits
as well we need to use the :alnum: character class instead.

Author: Daniel Gustafsson <[email protected]>
Discussion: https://postgr.es/m/2CB04559-B1D8-4558-B6F0-8F09093D629F@yesql.se

src/test/modules/test_misc/t/003_check_guc.pl

index 3ae4bb1cd9ddda47a5aaefc5ec0c2c25de12250b..f4f2f1121aaa4f834d57245e5d57a2c8aa8bcd31 100644 (file)
@@ -56,7 +56,7 @@ while (my $line = <$contents>)
    # file.
    # - Valid configuration options are followed immediately by " = ",
    # with one space before and after the equal sign.
-   if ($line =~ m/^#?([_[:alpha:]]+) = .*/)
+   if ($line =~ m/^#?([_[:alnum:]]+) = .*/)
    {
        # Lower-case conversion matters for some of the GUCs.
        my $param_name = lc($1);