Re: proposal: psql: psql variable BACKEND_PID

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: proposal: psql: psql variable BACKEND_PID
Дата
Msg-id a303731f-4d7d-50ae-2154-13b9bf210cf3@enterprisedb.com
обсуждение исходный текст
Ответ на Re: proposal: psql: psql variable BACKEND_PID  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 13.02.23 18:33, Pavel Stehule wrote:
> In every real use case you can use pg_backend_pid(), but you need to 
> write a complete name without tab complete, and you need to know so this 
> function is available.
> 
> BACKEND_PID is supported by  tab complete, and it is displayed in \set 
> list and \? variables. Nothing less, nothing more, Custom psql variable 
> can have some obsolete value.
> 
> I can imagine using :BACKEND_PID in \echo command - and it just saves 
> you one step with its own custom variable.
> 
> It is just some more comfort with almost zero cost.

This line of argument would open us up to copying just about every bit 
of session state into psql just to make it slightly easier to use.



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: old_snapshot_threshold bottleneck on replica
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Adding "large" to PG_TEST_EXTRA