BUG #18889: /src/backend/utils/adt/network.c condition is always false

PG Bug reporting form <noreply@postgresql.org>

From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dan-eli@mail.ru
Date: 2025-04-10T16:41:51Z
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18889
Logged by:          Daniel Elishakov
Email address:      dan-eli@mail.ru
PostgreSQL version: 17.4
Operating system:   Ubuntu 20.04
Description:        

On line 282 there is a check of nb < 0, which is always false, so i think it
is better to be replaced with 'Assert(nb > 0);'

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Remove useless check for negative result of ip_addrsize().