Re: proposal: psql: psql variable BACKEND_PID - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: proposal: psql: psql variable BACKEND_PID
Date
Msg-id a303731f-4d7d-50ae-2154-13b9bf210cf3@enterprisedb.com
Whole thread Raw
In response to Re: proposal: psql: psql variable BACKEND_PID  (Pavel Stehule <pavel.stehule@gmail.com>)
List 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 by date:

Previous
From: Andres Freund
Date:
Subject: Re: old_snapshot_threshold bottleneck on replica
Next
From: Tom Lane
Date:
Subject: Re: Adding "large" to PG_TEST_EXTRA