Add pg_version() to PostgreSQL::Test::Cluster

_pg_version (version number based on PostgreSQL::Version) is a field
private to Cluster.pm but there was no helper routine to retrieve it
from a Cluster's node.  The same is done for install_path, for example,
and the version object becomes handy when writing tests that need
version-specific handling.

Reviewed-by: Andrew Dunstan, Daniel Gustafsson
Discussion: https://postgr.es/m/YoWfoJTc987tsxpV@paquier.xyz
pull/84/head
Michael Paquier 3 years ago
parent a5084a10fe
commit b39838889e
  1. 14
      src/test/perl/PostgreSQL/Test/Cluster.pm

@ -331,6 +331,20 @@ sub install_path
=pod
=item $node->pg_version()
The version number for the node, from PostgreSQL::Version.
=cut
sub pg_version
{
my ($self) = @_;
return $self->{_pg_version};
}
=pod
=item $node->config_data($option)
Return a string holding configuration data from pg_config, with $option

Loading…
Cancel
Save