Re: Comfortably check BackendPID with psql - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: Comfortably check BackendPID with psql
Date
Msg-id 5579595F.8010901@joh.to
Whole thread Raw
In response to Comfortably check BackendPID with psql  (Naoya Anzai <nao-anzai@xc.jp.nec.com>)
Responses Re: Comfortably check BackendPID with psql  (Naoya Anzai <nao-anzai@xc.jp.nec.com>)
List pgsql-hackers
On 6/11/15 11:41 AM, Naoya Anzai wrote:
> This can change the input of the 24 characters to the only 4 characters!
> 
> Image.
> ----------------------
> naoya=# \bid
> Backend Process ID
>   pid
> ------
>   1716
> (1 row)
> -----------------------
> 
> How do you like it?

Seems easier to set this in .psqlrc:
 \set bid 'select pg_backend_pid();'

and then:

=# :bidpg_backend_pid
----------------         84430
(1 row)

No patches or concerns for psql version necessary.


.m



pgsql-hackers by date:

Previous
From: Naoya Anzai
Date:
Subject: Comfortably check BackendPID with psql
Next
From: Magnus Hagander
Date:
Subject: Re: skipping pg_log in basebackup (was Re: pg_basebackup and pg_stat_tmp directory)