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

From Daniel Verite
Subject Re: proposal: psql: psql variable BACKEND_PID
Date
Msg-id 424ee6ab-746b-442c-b30b-af42b591b664@manitou-mail.org
Whole thread Raw
In response to Re: proposal: psql: psql variable BACKEND_PID  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: proposal: psql: psql variable BACKEND_PID
List pgsql-hackers
    I wrote:

> > In the varlistentry, I suggest we add "This variable is unset when the
> > connection is lost." after "but can be changed or unset.
>
> Personally I'd much rather have BACKEND_PID set to 0 rather than being unset
> when not connected. For one thing it allows safely using \if :BACKEND_PID.

Oops it turns out that was wishful thinking from me.
\if does not interpret a non-zero integer as true, except for the
value "1".
I'd still prefer BACKEND_PID being 0 when not connected, though.

Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Time delayed LR (WAS Re: logical replication restrictions)
Next
From: "Takamichi Osumi (Fujitsu)"
Date:
Subject: RE: Time delayed LR (WAS Re: logical replication restrictions)