Minor code de-duplication in fe-connect.c

From: Gurjeet Singh <gurjeet(at)singh(dot)im>
To: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Minor code de-duplication in fe-connect.c
Date: 2023-04-21 05:29:35
Message-ID: CABwTF4Um-Y=QkfA42Sx0oThasNPgmurk_gU4hfy_Ntf64n4bUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Commit [1] implements Fisher-Yates shuffling algorithm to shuffle
connection addresses, in two places.

The attached patch moves the duplicated code to a function, and calls
it in those 2 places.

[1]: Support connection load balancing in libpq
7f5b19817eaf38e70ad1153db4e644ee9456853e

Best regards,
Gurjeet https://Gurje.et
Postgres Contributors Team, http://aws.amazon.com

Attachment Content-Type Size
v0-0001-Reduce-code-duplication-in-fe-connect.c.patch application/octet-stream 3.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yu Shi (Fujitsu) 2023-04-21 05:47:57 RE: Test failures of 100_bugs.pl
Previous Message Gurjeet Singh 2023-04-21 05:02:35 Re: Make message strings in fe-connect.c consistent