Re: Adding a pg_servername() function

Поиск
Список
Период
Сортировка
От Laetitia Avrot
Тема Re: Adding a pg_servername() function
Дата
Msg-id CAB_COdj33xCM9utPHKsGxOigVT9uEBfriy21_r9jQwkOMKMrZw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Adding a pg_servername() function  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Ответы Re: Adding a pg_servername() function  (066ce286@free.fr)
Re: Adding a pg_servername() function  (Christoph Moench-Tegeder <cmt@burggraben.net>)
Список pgsql-hackers


Le jeu. 3 août 2023, 11:31, Matthias van de Meent <boekewurm+postgres@gmail.com> a écrit :
On Thu, 3 Aug 2023 at 10:37, Laetitia Avrot <laetitia.avrot@gmail.com> wrote:
>
> Dear Hackers,
>
> One of my customers suggested creating a function that could return the server's hostname.

Mostly for my curiosity: What would be their use case?

Thank you for showing interest in that patch.

For my customer,  their use case is to be able from an SQL client to double check they're on the right host before doing things that could become a production disaster. 

I see also another use case: being able to identify postgres metrics on a monitoring tool. Look at the hack pg_staviz uses here: 

Those are the  use cases I can think of.

I only see limited usability, considering that the local user's
hostname can be very different from the hostname used in the url that
connects to that PostgreSQL instance.

Agreed, depending on how hosts and dns are set,  it can be useless. But normally,  companies have host making standards to avoid that.

Have a nice day, 

Lætitia 


Kind regards,

Matthias van de Meent
Neon (https://neon.tech)

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Matthias van de Meent
Дата:
Сообщение: Re: Extract numeric filed in JSONB more effectively
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [PoC] pg_upgrade: allow to upgrade publisher node