pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: postgresql.conf.sample tab width
Date: Fri, 14 Nov 2025 15:25:15 -0500
Message-ID: <3230808.1763151915@sss.pgh.pa.us> (raw)
In-Reply-To: <aReNUKdMgKxLqmq7@nathan>
References: <aReNUKdMgKxLqmq7@nathan>

Nathan Bossart <nathandbossart@gmail.com> writes:
> I noticed that GitHub is using 4-space tabs for this file [0], presumably
> due to this [1] recent change.  I'm not aware of an official policy for
> this file, but it seems to be written for 8-space tabs.

> One way to fix this is to set our default tab width to 8 in
> .gitattributes/.editorconfig (see attached patch).  AFAICT that doesn't
> affect source code files.  We could also add a special rule for
> postgresql.conf.sample, or we could even convert it to 4-space tabs.  Any
> druthers?

We've been around on this topic before.  It's hard for us to deal with
8-space tabs within our repo, but we should expect that users who are
editing their postgresql.conf files are probably going to be using
8-space tabs.

I seem to recall a proposal that the best fix is to not use tabs
at all in postgresql.conf.sample.  That seems like a good way out
to me.  I think we could fix .gitattributes so that "git diff --check"
would verify no tabs, but I've not looked into details.

			regards, tom lane





view thread (12+ messages)  latest in thread

Message-ID: <3230808.1763151915@sss.pgh.pa.us>
Permalink:  ../3230808.1763151915@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3230808.1763151915@sss.pgh.pa.us

 · 

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: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com
  Subject: Re: postgresql.conf.sample tab width
  In-Reply-To: <3230808.1763151915@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox