Skip to content
Snippets Groups Projects
Commit 01f53125 authored by Christoph Berg's avatar Christoph Berg :satellite:
Browse files

pg_wrapper: Also accept --cluster=ver/name in a single argument.

parent 72d5f51a
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ postgresql-common (158) UNRELEASED; urgency=medium
* Move pg_{create,ctl,upgrade,drop}cluster.8 to section 1, they are in
/usr/bin anyway.
* pg_upgradecluster: Deprecate krb_srvname in 9.4.
* pg_wrapper: Also accept --cluster=ver/name in a single argument.
* testsuite: Also mount /dev/shm; with -s, open shell on failure.
* Start porting the postgresql-common framework to RedHat, backed by the
PGDG PostgreSQL rpm packages.
......
......@@ -49,6 +49,14 @@ for (my $i = 0; $i <= $#ARGV; ++$i) {
splice @ARGV, $i, 2;
last;
} elsif ($ARGV[$i] =~ /^--cluster=(\d+\.\d)\/(.+)/) {
($version, $cluster) = ($1, $2);
$host = undef; # --cluster overrides $PGHOST env var
error 'Invalid version specified with --cluster' unless version_exists $version;
error 'No cluster specified with --cluster' unless $cluster;
splice @ARGV, $i, 1;
last;
}
$port_specified = 1 if $ARGV[$i] =~ /^--port\b/ || $ARGV[$i] =~ /^-\w*p\w*\d*$/;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment