mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
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
This commit is contained in:
parent
a5084a10fe
commit
b39838889e
@ -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…
x
Reference in New Issue
Block a user