| From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Michael Banck <mbanck(at)gmx(dot)net>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, "li(dot)evan(dot)chao" <li(dot)evan(dot)chao(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, Pgsql Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Serverside SNI support in libpq |
| Date: | 2026-05-04 20:31:36 |
| Message-ID: | DB146660-EED0-4926-B32A-1EF38EDFF4E9@yesql.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 4 May 2026, at 21:22, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> It seems quite odd to me that load_host(), which in fact returns
> HostsFileLoadResult codes, is declared to return int. That seems
> to have been done because HostsFileLoadResult wasn't declared in
> the same header, but there is no visible reason why it shouldn't be.
> Any objection to the attached fixup?
At some point during the development of the patch there was a reason (which I
cannot remember right now) for the declaration being in hba.h, but I clearly
missed moving it when that no longrer applied. No objections to the patch,
thanks!
> As a side matter, "load_host" seems like a remarkably generic name
> that conveys little about what it actually does, and to the extent
> that it does convey anything the implication is wrong: it returns
> (potentially) info about multiple hosts not just one. Can't we do
> better?
It's following the naming convention of load_hba() which reads pg_hba.conf, and
load_ident() which reads pg_ident.conf - thus load_hosts() for the function
that reads pg_hosts.conf. Perhaps load_pg_hosts_conf() or load_hosts_config()
would convey more meaning?
--
Daniel Gustafsson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sami Imseih | 2026-05-04 20:44:57 | Re: Track skipped tables during autovacuum and autoanalyze |
| Previous Message | Ayush Tiwari | 2026-05-04 19:57:00 | [PATCH] Clean up property graph error messages |