Re: Minor code de-duplication in fe-connect.c

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Gurjeet Singh <gurjeet(at)singh(dot)im>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Minor code de-duplication in fe-connect.c
Date: 2023-04-21 14:47:04
Message-ID: CA+TgmoY9UzOg0vKHtzVSaRnWe2v59RQRLNNu8MqMdCy6KxEizA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 21, 2023 at 8:25 AM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> The reason I left it like this when reviewing and committing is that I think it
> makes for more readable code. The amount of lines saved is pretty small, and
> "shuffle" isn't an exact term so by reading the code it isn't immediate clear
> what such a function would do. By having the shuffle algorithm where it's used
> it's clear what the code does and what the outcome is. If others disagree I
> can go ahead and refactor of course, but I personally would not deem it a net
> win in code quality.

I think we should avoid nitpicking stuff like this. I likely would
have used a subroutine if I'd done it myself, but I definitely
wouldn't have submitted a patch to change whatever the last person did
without some tangible reason for so doing. It's not a good use of
reviewer and committer time to litigate things like this.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2023-04-21 14:50:34 Re: base backup vs. concurrent truncation
Previous Message Imseih (AWS), Sami 2023-04-21 14:28:24 Correct the documentation for work_mem