From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Smith <smithpb2250(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_createsubscriber TAP test wrapping makes command options hard to read. |
Date: | 2024-12-12 17:52:09 |
Message-ID: | 5f41d6c6-1cbb-494d-a5c4-3c449fc4e9ad@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2024-12-12 Th 12:08 PM, Dagfinn Ilmari Mannsåker wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>> On 2024-12-12 Th 8:17 AM, Dagfinn Ilmari Mannsåker wrote:
>>>> Here's a more thorough patch, that also applies the fat comma treatment
>>>> to other pg_createsubscriber invocations in the same file that don't
>>>> currently happen to be mangled by perltidy. It also adds trailing
>>>> commas to the last item in multi-line command arrays, which is common
>>>> perl style.
>>> +1 for this approach.
>> Indeed, this is much nicer if it's something perltidy knows about.
>>
>> However, I know we have the same issue in many other places.
>> Anyone feel like running through all the TAP scripts?
> I can have a go in the next few days. A quick grep spotted another
> workaround in 027_stream_regress.pl: using paretheses around the option
> and its value:
>
> command_ok(
> [
> 'pg_dump',
> ('--schema', 'pg_catalog'),
> ('-f', $outputdir . '/catalogs_primary.dump'),
> '--no-sync',
> ('-p', $node_primary->port),
> '--no-unlogged-table-data',
> 'regression'
> ],
> 'dump catalogs of primary server');
>
> I think the fat comma is much nicer than this, so I'd like to convert
> these too (and replace some of the concatenations with interpolation).
>
> Technically the quotes aren't necessary around single-dash options
> before => since unary minus works on strings as well as numbers, but
> I'll leave them in for consistency.
>
I'd rather get rid of those and just use the long options.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Dagfinn Ilmari Mannsåker | 2024-12-12 18:03:33 | Re: pg_createsubscriber TAP test wrapping makes command options hard to read. |
Previous Message | Dagfinn Ilmari Mannsåker | 2024-12-12 17:08:01 | Re: pg_createsubscriber TAP test wrapping makes command options hard to read. |