File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -3426,6 +3426,17 @@ sub setup_target_databases {
3426
3426
my %group ;
3427
3427
my $found_new_var = 0;
3428
3428
3429
+ # # Do we have any using multiple values for non-passwords?
3430
+ my $got_multiple = 0;
3431
+ for my $v (keys %$conn ) {
3432
+ next if $v eq ' dbpass' or ! defined $opt {$v }[0];
3433
+ my $num = $opt {$v }-> @*;
3434
+ if ($num > 1 or $opt {$v }[0] =~ / ,/ ) {
3435
+ $got_multiple = 1;
3436
+ last ;
3437
+ }
3438
+ }
3439
+
3429
3440
for my $v (keys %$conn ) { # # For each connection var such as port, host...
3430
3441
my $vname = $v ;
3431
3442
@@ -3438,7 +3449,7 @@ sub setup_target_databases {
3438
3449
$new =~ s /\s +// g unless $vname eq ' dbservice' or $vname eq ' host' ;
3439
3450
3440
3451
# # Set this as the new default for this connection var moving forward
3441
- $conn -> {$vname } = [split /,/ => $new , -1];
3452
+ $conn -> {$vname } = $got_multiple ? [split /,/ => $new , -1] : [ $new ];
3442
3453
3443
3454
# # Make a note that we found something new this round
3444
3455
$found_new_var = 1;
@@ -11364,6 +11375,11 @@ =head1 HISTORY
11364
11375
11365
11376
=over 4
11366
11377
11378
+ =item B<Version 2.26.1 > not yet released
11379
+
11380
+ Allow commas in passwords via --dbpass for one-connection queries (Greg Sabino Mullane) [Github issue #133]
11381
+
11382
+
11367
11383
=item B<Version 2.26.0 > Released April 3, 2023
11368
11384
11369
11385
Add new action "pgbouncer_maxwait" (Ruslan Kabalin) [Github pull #59]
You can’t perform that action at this time.
0 commit comments