On Wed, 9 Aug 2023 at 16:05, Tom Lane <t...@sss.pgh.pa.us> wrote: > Peter Eisentraut <pe...@eisentraut.org> writes: > > On 09.08.23 08:42, Laetitia Avrot wrote: > >> My question is very simple: Do you oppose having this feature in > Postgres? > > > I think this is pretty harmless(*) and can be useful, so it seems > > reasonable to pursue. > > I actually do object to this, because I think the concept of "server > name" is extremely ill-defined >
Tom, But the gethostname() function is well defined, both in Linux and in Windows. Maybe the proposed name pg_servername() is unfortunate in that it may suggest that DNS or something else is involved, but in Laetitia's patch the call is to gethostname(). Would it be less problematic if the function were called pg_gethostname()? @Laetitia: why did you propose that name? maybe to avoid clashes with some extension out there? Best, Giovanni