Re: Add --check option to pgindent - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Add --check option to pgindent
Date
Msg-id 4b390361-484d-7598-ac13-db2dd7072ad3@dunslane.net
Whole thread Raw
In response to Re: Add --check option to pgindent  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Add --check option to pgindent
List pgsql-hackers
On 2023-12-12 Tu 10:30, Alvaro Herrera wrote:
> On 2023-Dec-12, Tom Lane wrote:
>
>> "Euler Taveira" <euler@eulerto.com> writes:
>>> When you add exceptions, it starts to complicate the UI.
>> Indeed.  It seems like --silent-diff was poorly defined and poorly
>> named, and we need to rethink that option along the way to adding
>> this behavior.  The idea that --show-diff and --silent-diff can
>> be used together is just inherently confusing, because they sound
>> like opposites
> Maybe it's enough to rename --silent-diff to --check.  You can do
> "--show-diff --check" and get both the error and the diff printed; or
> just "--check" and it'll throw an error without further ado; or
> "--show-diff" and it will both apply the diff and print it.
>

That seems reasonable. These features were fairly substantially debated 
when we put them in, but I'm fine with some tweaking. But note: 
--show-diff doesn't apply the diff, it's intentionally non-destructive.


cheers


andrew

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




pgsql-hackers by date:

Previous
From: "Imseih (AWS), Sami"
Date:
Subject: [BUG] autovacuum may skip tables when session_authorization/role is set on database
Next
From: "Tristan Partin"
Date:
Subject: Re: Clean up find_typedefs and add support for Mac