Re: [PATCH] Connection time for \conninfo

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCH] Connection time for \conninfo
Дата
Msg-id 13d3d5d7-d898-ee9f-5ced-94c9b7aab514@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [PATCH] Connection time for \conninfo  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: [PATCH] Connection time for \conninfo  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
On 2020-03-10 18:38, Stephen Frost wrote:
>> On 2/27/20 4:21 AM, Peter Eisentraut wrote:
>>> My opinion is that this is not particularly useful and not appropriate to
>>> piggy-back onto \conninfo.  Connection information including host, port,
>>> database, user name is a well-established concept in PostgreSQL programs
>>> and tools and it contains a delimited set of information. Knowing what
>>> server and what database you are connected to also seems kind of
>>> important.  Moreover, this is information that is under control of the
>>> client, so it must be tracked on the client side.
> 
> I have to say that I disagree.  Wishing to know when you connected to a
> server is entirely reasonable and it's also rather clearly under control
> of the client (though I don't entirely understand that argument in the
> first place).

The argument is that the server already knows when the client connected 
and that information is already available.  So there is no reason for 
the client to also track and display that information, other than 
perhaps convenience.  But the server does not, in general, know what 
host and port the client connected to (because of proxying and other 
network stuff), so this is something that the client must record itself.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Connection time for \conninfo