Re: Small TAP improvements

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Small TAP improvements
Дата
Msg-id 78241.1655223656@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Small TAP improvements  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Small TAP improvements  (Andrew Dunstan <andrew@dunslane.net>)
Re: Small TAP improvements  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> The first makes the argument for $node->config_data() optional. If it's
> not supplied, pg_config is called without an argument and the whole
> result is returned. Currently, if you try that you get back a nasty and
> cryptic error.

No opinion about whether that's useful.

> The second changes the new GUCs TAP test to check against the installed
> postgresql.conf.sample rather than the one in the original source
> location. There are probably arguments both ways, but if we ever decided
> to postprocess the file before installation, this would do the right thing.

Seems like a good idea, especially since it also makes the test code
shorter and more robust(-looking).

Looking at the patch itself,

+my $share_dir = $node->config_data('--sharedir');
+chomp $share_dir;
+$share_dir =~ s/^SHAREDIR = //;
+my $sample_file = "$share_dir/postgresql.conf.sample";

I kind of wonder why config_data() isn't doing the chomp itself;
what caller would not want that?  Pulling off the variable name
might be helpful too, since it's hard to conceive of a use-case
where you don't also need that.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: better page-level checksums
Следующее
От: Tom Lane
Дата:
Сообщение: Re: better page-level checksums