Re: run pgindent on a regular basis / scripted manner

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: run pgindent on a regular basis / scripted manner
Дата
Msg-id f8006b81-2646-bfa8-d770-501e4bf31241@dunslane.net
обсуждение исходный текст
Ответ на Re: run pgindent on a regular basis / scripted manner  (Jelte Fennema <postgres@jeltef.nl>)
Ответы Re: run pgindent on a regular basis / scripted manner  (Jelte Fennema <postgres@jeltef.nl>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Melih Mutlu
Дата:
Сообщение: Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Non-superuser subscription owners