Skip to content

Commit b398388

Browse files
committed
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
1 parent a5084a1 commit b398388

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/perl/PostgreSQL/Test/Cluster.pm

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,20 @@ sub install_path
331331

332332
=pod
333333
334+
=item $node->pg_version()
335+
336+
The version number for the node, from PostgreSQL::Version.
337+
338+
=cut
339+
340+
sub pg_version
341+
{
342+
my ($self) = @_;
343+
return $self->{_pg_version};
344+
}
345+
346+
=pod
347+
334348
=item $node->config_data($option)
335349
336350
Return a string holding configuration data from pg_config, with $option

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy