Re: Set notice receiver before libpq connection startup

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Set notice receiver before libpq connection startup
Date: 2026-05-28 05:22:21
Message-ID: CAHGQGwHBPqis=pP7ui-x1vNboG5dGHkieVJoEbZfEkFgNnU1Zw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 28, 2026 at 9:40 AM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
> > The committed patch violates the .gitattributes whitespace rules:
> >
> > git show --check 06a5c3cdef02
> >
> > contrib/postgres_fdw/connection.c:651: indent with spaces.
> > + /* expand_dbname = */ false);
> >
> > It is unfortunate that pgindent produces this layout that contradicts the git configuration. (The current formatting also doesn't look like what I would produce in an editor, so I think git is right here.)
> >
> > Maybe we could reformat this slightly to avoid that? (unless someone wants to try to fix pgindent)

Thanks for the report!

> Ah, I was not aware of the whitespace rule. I think it was not pgindent; I made that change manually. I added “=” because I thought it might read more fluently.
>
> Attached is a fix for that.

Thanks for the patch!

I suspect the whitespace issue was caused by pgindent that I ran
before committing the patch.

- /* expand_dbname = */ false);
+ false /* expand_dbname */ );

I think "/* expand_dbname = */ false" looks better. libpqwalreceiver.c
also uses that comment style. So how about the attached v2 patch, which
reformats the comment accordingly?

After applying the v2 patch, I confirmed that neither "git show --check ..."
nor pgindent reports any issues.

Regards,

--
Fujii Masao

Attachment Content-Type Size
v2-0001-Fix-an-indentation-problem-in-postgres_fdw-connec.patch application/octet-stream 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shinya Kato 2026-05-28 05:34:54 Re: Report oldest xmin source when autovacuum cannot remove tuples
Previous Message Zhijie Hou (Fujitsu) 2026-05-28 05:18:34 RE: Adding REPACK [concurrently]