Re: Small TAP improvements

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Small TAP improvements
Дата
Msg-id 9f7aff83-b5eb-4325-b3a2-3bf18ecc068f@dunslane.net
обсуждение исходный текст
Ответ на Re: Small TAP improvements  (Álvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: Small TAP improvements  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Small TAP improvements  (Álvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On 2022-06-14 Tu 12:44, Álvaro Herrera wrote:
> The comment atop config_data still mentions $option, but after the patch that's no longer a name used in the
function.(I have to admit that using @_ in the body of the function was a little bit confusing to me at first. Did you
dothat in order to allow multiple options to be passed?)
 
>
> Also: if you give an option to pg_config, the output is not prefixed with the variable name. So you don't need to
stripthe "SHAREDIR =" bit: there isn't any.  This is true even if you give multiple options:
 
>
> schmee: master 0$ pg_config --sharedir --includedir
> /home/alvherre/Code/pgsql-install/REL9_6_STABLE/share
> /home/alvherre/Code/pgsql-install/REL9_6_STABLE/include


OK, here's a more principled couple of patches. For config_data, if you
give multiple options it gives you back the list of values. If you don't
specify any, in scalar context it just gives you back all of pg_config's
output, but in array context it gives you a map, so you should be able
to say things like:

    my %node_config = $node->config_data;

cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Вложения

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

Предыдущее
От: Przemysław Sztoch
Дата:
Сообщение: Re: generate_series for timestamptz and time zone problem
Следующее
От: Robert Haas
Дата:
Сообщение: Re: better page-level checksums