public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrew Dunstan <[email protected]>
To: Tom Lane <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: Jelte Fennema <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Justin Pryzby <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Noah Misch <[email protected]>
Cc: Peter Geoghegan <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Magnus Hagander <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Stephen Frost <[email protected]>
Cc: Jesse Zhang <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: run pgindent on a regular basis / scripted manner
Date: Wed, 26 Apr 2023 15:44:47 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAH2-Wzm0niYBPcN6eX3PzHABfj0dE3fwifo5bdturvMp=9FGqw@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAGECzQSUYmfTwEWcVfwb4d=vf=M7RYJjq6ie0YPTUhP+YFcEww@mail.gmail.com>
<[email protected]>
<OSZPR01MB63100E1C06045FB66B16728BFDA09@OSZPR01MB6310.jpnprd01.prod.outlook.com>
<[email protected]>
<CAGECzQSu6mLzPhd7csBfnXtW9kfoVRn5TWFH1fPGMc4mpkHyOw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAGECzQQH35856o4LsOF5kBAEwna_ONBcarCFcShwbh1yhXAa_w@mail.gmail.com>
<ef2edec2-e55e-a751-a90f-5929b! [email protected]>
<[email protected]! gh.pa.us>
<[email protected]>
<[email protected]>
On 2023-04-26 We 09:27, Tom Lane wrote:
> Peter Eisentraut<[email protected]> writes:
>> On 24.04.23 16:14, Tom Lane wrote:
>>> I certainly don't like its current behavior where adding/changing one
>>> line can have side-effects on nearby lines. But we have a proposal
>>> to clean that up, and I'm cautiously optimistic that it'll be better
>>> in future. Did you have other specific concerns?
>> I think the worst is how it handles multi-line data structures like
>> $newnode->command_ok(
>> [
>> 'psql', '-X',
>> '-v', 'ON_ERROR_STOP=1',
>> '-c', $upcmds,
>> '-d', $oldnode->connstr($updb),
>> ],
>> "ran version adaptation commands for database $updb");
> Yeah, I agree, there is no case where that doesn't suck. I don't
> mind it imposing specific placements of brackets and so on ---
> that's very analogous to what pgindent will do. But it likes to
> re-flow comma-separated lists, and generally manages to make a
> complete logical hash of them when it does, as in your other
> example:
>
>> $node->command_fails_like(
>> [
>> 'pg_basebackup', '-D',
>> "$tempdir/backup", '--compress',
>> $cft->[0]
>> ],
>> qr/$cfail/,
>> 'client ' . $cft->[2]);
> Can we fix it to preserve the programmer's choices of line breaks
> in comma-separated lists?
I doubt there's something like that. You can freeze arbitrary blocks of
code like this (from the manual)
#<<< format skipping: do not let perltidy change my nice formatting
my @list = (1,
1, 1,
1, 2, 1,
1, 3, 3, 1,
1, 4, 6, 4, 1,);
#>>>
But that gets old and ugly pretty quickly.
There is a --freeze-newlines option, but it's global. I don't think we
want that.
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
view thread (142+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: run pgindent on a regular basis / scripted manner
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox