Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitba15f16

Browse files
committed
Add PostgreSQL::Test::Cluster::config_data()
This is useful to grab some configuration information from a nodealready set up, and I personally found two cases for it: pg_upgrade anda test to emulate check_guc.Author: Michael PaquierDiscussion:https://postgr.es/m/20211129030833.GJ17618@telsasoft.comDiscussion:https://postgr.es/m/YJ8xTmLQkotVLpN5@paquier.xyz
1 parentf1ea98a commitba15f16

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,31 @@ sub install_path
327327

328328
=pod
329329
330+
=item$node->config_data($option)
331+
332+
Return a string holding configuration data from pg_config, with $option
333+
being the option switch used with the pg_config command.
334+
335+
=cut
336+
337+
subconfig_data
338+
{
339+
my ($self,$option) =@_;
340+
local%ENV =$self->_get_env();
341+
342+
my ($stdout,$stderr);
343+
my$result =
344+
IPC::Run::run [$self->installed_command('pg_config'),$option ],
345+
'>', \$stdout,'2>', \$stderr
346+
ordie"could not execute pg_config";
347+
chomp($stdout);
348+
$stdout =~s/\r$//;
349+
350+
return$stdout;
351+
}
352+
353+
=pod
354+
330355
=item$node->info()
331356
332357
Return a string containing human-readable diagnostic information (paths, etc)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp