pgsql: Declare load_hosts() as returning HostsFileLoadResult.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Declare load_hosts() as returning HostsFileLoadResult.
Date: 2026-05-04 22:33:21
Message-ID: E1wK1qr-000Ngc-1k@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Declare load_hosts() as returning HostsFileLoadResult.

This function returns some value of enum HostsFileLoadResult,
but for reasons lost in the development process was declared to
return "int". Fix that, for clarity and so that our typedefs
collection tooling sees the typedef as used. Also fix the
variable that the sole call assigns into. Move the typedef
to the header file that declares load_hosts() to avoid creating
header dependency problems.

Discussion: https://postgr.es/m/359138.1777922557@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/93da29736649f8f7ecb0787f233a28a02a9738db

Modified Files
--------------
src/backend/libpq/be-secure-common.c | 2 +-
src/backend/libpq/be-secure-openssl.c | 2 +-
src/include/libpq/hba.h | 9 ---------
src/include/libpq/libpq.h | 11 ++++++++++-
4 files changed, 12 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Richard Guo 2026-05-05 01:35:22 pgsql: Consider collation when proving uniqueness from unique indexes
Previous Message Peter Eisentraut 2026-05-04 19:06:50 pgsql: Add ORDER BY to test query to stabilize test