Re: Adding a pg_servername() function

From: GF <phabriz(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Laetitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>, Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding a pg_servername() function
Date: 2023-08-09 15:32:22
Message-ID: CAFePLY3ZL9dt5xGj-1TCsa9VZn1Foz6=Fm_+R7CMXdz+DHo5LQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 9 Aug 2023 at 16:05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Peter Eisentraut <peter(at)eisentraut(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2023-08-09 15:41:21 Re: pg15: reltuples stuck at -1 after pg_upgrade and VACUUM
Previous Message Tristan Partin 2023-08-09 15:29:56 Re: Fix last unitialized memory warning