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

From Naoya Anzai
Subject Re: Comfortably check BackendPID with psql
Date
Msg-id 116262CF971C844FB6E793F8809B51C6E9AA7F@BPXM02GP.gisp.nec.co.jp
Whole thread Raw
In response to Re: Comfortably check BackendPID with psql  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
> > >Not a big fan of that abbreviation itself. What I'd wondered about
> > >instead - and actually had patched into my psql at some point - is
> > >adding an appropriate escape to psql's PROMPT. I think that'd serve your
> > >purpose as well?
> >
> > +3.14159; that would be hugely helpful when using gdb.
>
> You can get that today.  In ~/.psqlrc:
>
> SELECT pg_catalog.pg_backend_pid() AS backend_pid \gset
> \set PROMPT1 '%m %:backend_pid: %/%R%# '
>
> It doesn't update after \connect, but the overlap between my use of \connect
> and my use of debuggers is tiny.

Thank you all!
My hack is going to be much smoother.

Regards,

Naoya

---
Naoya Anzai
Engineering Department
NEC Solution Inovetors, Ltd.
E-Mail: nao-anzai@xc.jp.nec.com
---



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Is it possible to have a "fast-write" Index?
Next
From: Michael Paquier
Date:
Subject: Re: pg_rewind failure by file deletion in source server