On Mon, Jul 27, 2026 at 01:38:57PM +0900, Yugo Nagata wrote:
> If $mapped_name contains a hyphen, this results in a syntax error.
> The attached patch fixes this by properly quoting the role name:
>
> $node->safe_psql('postgres', "CREATE ROLE \"$mapped_name\" LOGIN");
>
> # Create target role for \1 tests.
> my $mapped_name = "test${regex_test_string}map${regex_test_string}user";
> -$node->safe_psql('postgres', "CREATE ROLE $mapped_name LOGIN");
> +$node->safe_psql('postgres', "CREATE ROLE \"$mapped_name\" LOGIN");I doubt that this is worth beyond what you are proposing here, so just applying double quotes are you are doing sounds good to me. Will fix and backpatch on portability ground. -- Michael
signature.asc
Description: PGP signature
