Thread
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Declare load_hosts() as returning HostsFileLoadResult.
- 93da29736649 19 (unreleased) landed
-
Re: Serverside SNI support in libpq
Tom Lane <tgl@sss.pgh.pa.us> — 2026-05-04T19:22:37Z
In preparation for our annual pgindent update, I checked what happens when I install the buildfarm's version of typedefs.list, and I found that the typedef HostsFileLoadResult (from 4f433025f) gets misformatted because it's not in the buildfarm's list. That's because the buildfarm mechanism only captures typedefs that are used to declare some object (variable, function, field) and this one isn't. 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? 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? regards, tom lane
-
Re: Serverside SNI support in libpq
Tom Lane <tgl@sss.pgh.pa.us> — 2026-05-04T19:27:20Z
I wrote: > 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? Sigh ... brain fade there, of course the function is load_hosts not load_host. It's still too generic IMO, but at least the pluralization is right. regards, tom lane
-
Re: Serverside SNI support in libpq
Daniel Gustafsson <daniel@yesql.se> — 2026-05-04T20:31:36Z
> On 4 May 2026, at 21:22, Tom Lane <tgl@sss.pgh.pa.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
-
Re: Serverside SNI support in libpq
Tom Lane <tgl@sss.pgh.pa.us> — 2026-05-04T22:00:02Z
Daniel Gustafsson <daniel@yesql.se> writes: >> On 4 May 2026, at 21:22, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> As a side matter, "load_host" seems like a remarkably generic name >> that conveys little about what it actually does, > 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? Hmm, okay. I'd prefer a more specific name, but it wouldn't make much sense unless we also rename those two. That's probably more code churn than is justified. I'll push the thing for moving/using the typedef, but leave the function name alone. regards, tom lane
-
Re: Serverside SNI support in libpq
Daniel Gustafsson <daniel@yesql.se> — 2026-05-05T07:40:19Z
> On 5 May 2026, at 00:00, Tom Lane <tgl@sss.pgh.pa.us> wrote: > I'll push the thing for moving/using the typedef, but leave the > function name alone. Thanks! -- Daniel Gustafsson