Re: run pgindent on a regular basis / scripted manner - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: run pgindent on a regular basis / scripted manner
Date
Msg-id f8006b81-2646-bfa8-d770-501e4bf31241@dunslane.net
Whole thread Raw
In response to Re: run pgindent on a regular basis / scripted manner  (Jelte Fennema <postgres@jeltef.nl>)
Responses Re: run pgindent on a regular basis / scripted manner
List pgsql-hackers
On 2023-01-23 Mo 09:49, Jelte Fennema wrote:
> Indeed the flags you added are enough. Attached is a patch
> that adds an updated pre-commit hook with the same behaviour
> as the one before. I definitely think having a pre-commit hook
> in the repo is beneficial, since writing one that works in all
> cases definitely takes some time.


I didn't really like your hook, as it forces a reindent, and many people
won't want that (for reasons given elsewhere in this thread).

Here's an extract from my pre-commit hook that does that if PGAUTOINDENT
is set to "yes", and otherwise just warns you that you need to run pgindent.


cheers


andrew


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

Attachment

pgsql-hackers by date:

Previous
From: Melih Mutlu
Date:
Subject: Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication
Next
From: Robert Haas
Date:
Subject: Re: Non-superuser subscription owners