Subject: pgindent vs. git whitespace check

From: Peter Eisentraut <[email-masked]>
Date: Wed, 22 Feb 2023 09:17:05 +0100

Commit e4602483e95 accidentally introduced a situation where pgindent
disagrees with the git whitespace check.  The code is

         conn = libpqsrv_connect_params(keywords, values,
                                         /* expand_dbname = */ false,
                                        PG_WAIT_EXTENSION);

where the current source file has 4 spaces before the /*, and the
whitespace check says that that should be a tab.

I think it should actually be 3 spaces, so that the "/*..." lines up
with the "keywords..." and "PG_WAIT..." above and below.

I suppose this isn't going to be a quick fix in pgindent, but if someone
is keeping track, maybe this could be added to the to-consider list.

In the meantime, I suggest we work around this, perhaps by

         conn = libpqsrv_connect_params(keywords, values, /* expand_dbname = */ false,
                                        PG_WAIT_EXTENSION);

which appears to be robust for both camps.

---

From: Alvaro Herrera <[email-masked]>
Date: Wed, 22 Feb 2023 15:49:48 +0100

>         conn = libpqsrv_connect_params(keywords, values, /* expand_dbname = */ false,

I suggest

         conn = libpqsrv_connect_params(keywords, values,
		 								false, /* expand_dbname */
                                        PG_WAIT_EXTENSION);

which is what we typically do elsewhere and doesn't go overlength.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
Maybe there's lots of data loss but the records of data loss are also lost.
(Lincoln Yeoh)