Skip to content
Snippets Groups Projects
Commit 7484e920 authored by Martin Pitt's avatar Martin Pitt
Browse files

pg_wrapper: check that specified cluster actually exists

parent f6a96c15
No related branches found
No related tags found
No related merge requests found
Showing
with 16 additions and 1 deletion
...@@ -8,7 +8,7 @@ $VERSION = 1.00; ...@@ -8,7 +8,7 @@ $VERSION = 1.00;
@ISA = ('Exporter'); @ISA = ('Exporter');
@EXPORT = qw/error set_conf_value get_conf_value user_cluster_map @EXPORT = qw/error set_conf_value get_conf_value user_cluster_map
get_program_path cluster_info get_versions get_newest_version get_program_path cluster_info get_versions get_newest_version
get_version_clusters next_free_port/; get_version_clusters next_free_port cluster_exists/;
@EXPORT_OK = qw/$confroot/; @EXPORT_OK = qw/$confroot/;
# configuration # configuration
...@@ -134,6 +134,15 @@ sub get_version_clusters { ...@@ -134,6 +134,15 @@ sub get_version_clusters {
return @clusters; return @clusters;
} }
# Check if a cluster exists.
# Arguments: <version> <cluster>
sub cluster_exists {
for $c (get_version_clusters $_[0]) {
return 1 if $c eq $_[1];
}
return 0;
}
# Return the next free PostgreSQL port. # Return the next free PostgreSQL port.
sub next_free_port { sub next_free_port {
# create list of already used ports # create list of already used ports
......
File moved
postgresql-common (2) experimental; urgency=low
* pg_wrapper: Check that specified cluster actually exists.
-- Martin Pitt <mpitt@debian.org> Wed, 2 Mar 2005 16:55:12 +0100
postgresql-common (1) experimental; urgency=low postgresql-common (1) experimental; urgency=low
* New package to provide a common infrastructure for different PostgreSQL * New package to provide a common infrastructure for different PostgreSQL
......
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment