Re: Small TAP improvements

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Small TAP improvements
Date: 2022-06-14 20:21:48
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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 do that 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 strip the "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;



Andrew Dunstan

Attachment Content-Type Size
v2-0001-Make-config_data-method-more-flexible.patch text/x-patch 2.3 KB
v2-0002-Use-installed-postgresql.conf.sample-for-GUC-sani.patch text/x-patch 1.3 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-06-14 20:22:42 Re: better page-level checksums
Previous Message Przemysław Sztoch 2022-06-14 19:46:26 Re: generate_series for timestamptz and time zone problem